Fixed bug #17074: Allow core navigation components (Thanks to Stefan Galinski)
authorSteffen Kamper <info@sk-typo3.de>
Mon, 17 Jan 2011 09:44:33 +0000 (09:44 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Mon, 17 Jan 2011 09:44:33 +0000 (09:44 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10094 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_extmgm.php
typo3/backend.php

index 88a99f7..aa623e5 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2011-01-17  Steffen Kamper  <steffen@typo3.org>
 
-       * Fixed issue #17017: New pagetree doesn't work with all web submodules
+       * Fixed bug #17074: Allow core navigation components (Thanks to Stefan Galinski)
+       * Fixed bug #17017: New pagetree doesn't work with all web submodules
 
 2011-01-16  Francois Suter  <francois.suter@typo3.org>
 
index ef488eb..264fa4e 100644 (file)
@@ -844,10 +844,24 @@ final class t3lib_extMgm {
                $GLOBALS['TBE_MODULES']['_navigationComponents'][$module] = array(
                        'componentId' => $componentId,
                        'extKey' => $GLOBALS['_EXTKEY'],
+                       'isCoreComponent' => FALSE,
                        'extDirectNamespaces' => $extDirectNamespaces
                );
        }
 
+       /**
+        * Registers a core navigation component
+        *
+        * @param string $module
+        * @param string $componentId
+        * @param array $extDirectNamespaces
+        * @return void
+        */
+       public static function addCoreNavigationComponent($module, $componentId, $extDirectNamespaces = array()) {
+               self::addNavigationComponent($module, $componentId, $extDirectNamespaces);
+               $GLOBALS['TBE_MODULES']['_navigationComponents'][$module]['isCoreComponent'] = TRUE;
+       }
+
 
        /**************************************
         *
index 6609de2..a578d1f 100644 (file)
@@ -313,8 +313,14 @@ class TYPO3backend {
 
                        $component = strtolower(substr($info['componentId'], strrpos($info['componentId'], '-') + 1));
                        $componentDirectory = 'components/' . $component . '/';
-                       $absoluteComponentPath = t3lib_extMgm::extPath($info['extKey']) . $componentDirectory;
-                       $relativeComponentPath = t3lib_extMgm::extRelPath($info['extKey']) . $componentDirectory;
+
+                       if ($info['isCoreComponent']) {
+                               $absoluteComponentPath = PATH_t3lib . 'js/extjs/' . $componentDirectory;
+                               $relativeComponentPath = '../' . str_replace(PATH_site, '', $absoluteComponentPath);
+                       } else {
+                               $absoluteComponentPath = t3lib_extMgm::extPath($info['extKey']) . $componentDirectory;
+                               $relativeComponentPath = t3lib_extMgm::extRelPath($info['extKey']) . $componentDirectory;
+                       }
 
                        $cssFiles = t3lib_div::getFilesInDir($absoluteComponentPath . 'css/', 'css');
                        if (file_exists($absoluteComponentPath . 'css/loadorder.txt')) {