Follow-up to Merged Extension Manager: fixed repository / icon directory independent...
authorSteffen Kamper <info@sk-typo3.de>
Thu, 13 Jan 2011 00:36:37 +0000 (00:36 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Thu, 13 Jan 2011 00:36:37 +0000 (00:36 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10058 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/em/classes/class.tx_em_extensionmanager.php
typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php

index a9ef52e..62dd528 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
 
 2011-01-12  Steffen Kamper  <steffen@typo3.org>
 
+       * Follow-up to Merged Extension Manager: fixed repository / icon directory independent from t3skin
        * Merged Extension Manager (version for TYPO3 4.5 Beta 4)
        * Fixed issue #16986: Grid wizard miss tooltips and localization
 
index de0ac8f..a0830e5 100644 (file)
@@ -109,8 +109,8 @@ class tx_em_ExtensionManager {
 
                }
 
-                       // TODO: use sprite iconCls
-               $iconsGfxPath = t3lib_extMgm::extRelPath('t3skin') . 'icons/gfx/';
+
+               $iconsGfxPath = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['relDir'] . 'gfx/';
                $this->pageRenderer->addCssInlineBlock('em-t3skin-icons', '
                        .x-tree-node-leaf img.tree-edit { background-image:url(' . $iconsGfxPath . 'edit_file.gif);}
                        .x-btn-edit { background-image:url(' . $iconsGfxPath . 'edit2.gif) !important;}
index 33baba3..bdd60c1 100644 (file)
@@ -676,27 +676,24 @@ class tx_em_Connection_ExtDirectServer {
        /**
         * Loads repositories
         *
-        * @param  boolean $selectedOnly
         * @return array
         */
-       public function getRepositories($selectedOnly = FALSE) {
+       public function getRepositories() {
                $settings = $this->getSettings();
                $repositories = tx_em_Database::getRepositories();
                $data = array();
 
                foreach ($repositories as $uid => $repository) {
-                       if (!$selectedOnly || ($selectedOnly && $repository['uid'] == $settings['selectedRepository'])) {
-                               $data[] = array(
-                                       'title' => $repository['title'],
-                                       'uid' => $repository['uid'],
-                                       'description' => $repository['description'],
-                                       'wsdl_url' => $repository['wsdl_url'],
-                                       'mirror_url' => $repository['mirror_url'],
-                                       'count' => $repository['extCount'],
-                                       'updated' => $repository['lastUpdated'] ? date('d/m/Y H:i', $repository['lastUpdated']) : 'never',
-                                       'selected' => $repository['uid'] === $settings['selectedRepository'],
-                               );
-                       }
+                       $data[] = array(
+                               'title' => $repository['title'],
+                               'uid' => $repository['uid'],
+                               'description' => $repository['description'],
+                               'wsdl_url' => $repository['wsdl_url'],
+                               'mirror_url' => $repository['mirror_url'],
+                               'count' => $repository['extCount'],
+                               'updated' => $repository['lastUpdated'] ? date('d/m/Y H:i', $repository['lastUpdated']) : 'never',
+                               'selected' => $repository['uid'] === $settings['selectedRepository'],
+                       );
                }
 
                return array(
@@ -1226,6 +1223,34 @@ class tx_em_Connection_ExtDirectServer {
                 );
        }
 
+       /**
+        * Get the selected repository
+        *
+        * @return array
+        */
+       protected function getSelectedRepository() {
+               $settings = $this->getSettings();
+               $repositories = tx_em_Database::getRepositories();
+               $selectedRepository = array();
+
+               foreach ($repositories as $uid => $repository) {
+                       if ($repository['uid'] == $settings['selectedRepository']) {
+                               $selectedRepository = array(
+                                       'title' => $repository['title'],
+                                       'uid' => $repository['uid'],
+                                       'description' => $repository['description'],
+                                       'wsdl_url' => $repository['wsdl_url'],
+                                       'mirror_url' => $repository['mirror_url'],
+                                       'count' => $repository['extCount'],
+                                       'updated' => $repository['lastUpdated'] ? date('d/m/Y H:i', $repository['lastUpdated']) : 'never',
+                                       'selected' => $repository['uid'] === $settings['selectedRepository'],
+                               );
+                       }
+               }
+
+               return $selectedRepository;
+       }
+
 }
 
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/sysext/em/classes/connection/class.tx_em_connectionextdirectserver.php'])) {