Fixed issue #17017: New pagetree doesn't work with all web submodules
authorSteffen Kamper <info@sk-typo3.de>
Mon, 17 Jan 2011 09:36:00 +0000 (09:36 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Mon, 17 Jan 2011 09:36:00 +0000 (09:36 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10093 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_loadmodules.php
typo3/sysext/pagetree/ext_tables.php

index 4c51bd4..88a99f7 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-17  Steffen Kamper  <steffen@typo3.org>
+
+       * Fixed issue #17017: New pagetree doesn't work with all web submodules
+
 2011-01-16  Francois Suter  <francois.suter@typo3.org>
 
        * Follow-up to #16966: Missing trailing comma in sliding fields list caused SQL error
index bed6df2..e843e97 100644 (file)
@@ -255,6 +255,11 @@ class t3lib_loadModules {
                        }
                }
 
+                       // check if this is a submodule
+               if (strpos($name, '_') !== FALSE) {
+                       list($mainModule, ) = explode('_', $name, 2);
+               }
+
                $modconf = array();
                $path = preg_replace('/\/[^\/.]+\/\.\.\//', '/', $fullpath); // because 'path/../path' does not work
                if (@is_dir($path) && file_exists($path . '/conf.php')) {
@@ -331,8 +336,13 @@ class t3lib_loadModules {
                                        $modconf['navFrameScriptParam'] = $MCONF['navFrameScriptParam'];
                                }
 
+                                       // check if there is a navigation component (like the pagetree)
                                if (is_array($this->navigationComponents[$name])) {
                                        $modconf['navigationComponentId'] = $this->navigationComponents[$name]['componentId'];
+                                               // check if the parent has a navigation component that also
+                                               // goes down to the submodules (if they haven't overwritten it yet)
+                               } else if ($mainModule && is_array($this->navigationComponents[$mainModule])) {
+                                       $modconf['navigationComponentId'] = $this->navigationComponents[$mainModule]['componentId'];
                                }
                        } else {
                                return FALSE;
@@ -486,4 +496,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_loadmodules.php']);
 }
 
-?>
\ No newline at end of file
+?>
index c51b7a6..e109151 100644 (file)
@@ -5,15 +5,10 @@ if (!defined('TYPO3_MODE')) {
 }
 
 if (TYPO3_MODE === 'BE') {
-       $modules = array(
-               'web_layout', 'web_view', 'web_list', 'web_info', 'web_perm', 'web_func', 'web_ts',
-               'web_txrecyclerM1', 'web_txversionM1'
-       );
-       foreach ($modules as $module) {
-               t3lib_extMgm::addNavigationComponent($module, 'typo3-pagetree', array(
-                       'TYPO3.Components.PageTree'
-               ));
-       }
+
+       t3lib_extMgm::addNavigationComponent('web', 'typo3-pagetree', array(
+               'TYPO3.Components.PageTree'
+       ));
 
        $absoluteExtensionPath = t3lib_extMgm::extPath($_EXTKEY);
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ExtDirect'] = array_merge(
@@ -28,4 +23,4 @@ if (TYPO3_MODE === 'BE') {
        );
 }
 
-?>
\ No newline at end of file
+?>