Fixed bug #12506: JSMENU does not respect mount point overlays (Thanks to Joerg Wagner)
authorBenni Mack <benni.mack@typo3.org>
Mon, 4 Jan 2010 16:04:00 +0000 (16:04 +0000)
committerBenni Mack <benni.mack@typo3.org>
Mon, 4 Jan 2010 16:04:00 +0000 (16:04 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6713 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_menu.php

index 0361094..0018d21 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,14 @@
+2010-01-04  Benjamin Mack  <benni@typo3.org>
+
+       * Fixed bug #12506: JSMENU does not respect mount point overlays (Thanks to Joerg Wagner)
+
 2010-01-03  Xavier Perseguers  <typo3@perseguers.ch>
 
        * Added feature #13135: Support for CASE WHEN flow control
 
 2010-01-03  Benjamin Mack  <benni@typo3.org>
 
-       * Fixed bug #13095: Massuploader: Max file size is shown in KB (THanks to Steffen Gebert)
+       * Fixed bug #13095: Massuploader: Max file size is shown in KB (Thanks to Steffen Gebert)
 
 2009-12-30  Xavier Perseguers  <typo3@perseguers.ch>
 
index ddcc1eb..4ea5612 100644 (file)
@@ -2888,10 +2888,6 @@ class tslib_jsmenu extends tslib_menu {
                        $pid = $mount_info['mount_pid'];
                }
 
-                       // Set "&MP=" var:
-               $MP_var = implode(',',$MP_array);
-               $MP_params = $MP_var ? '&MP='.rawurlencode($MP_var) : '';
-
                        // UIDs to ban:
                $banUidArray = $this->getBannedUids();
 
@@ -2904,11 +2900,22 @@ class tslib_jsmenu extends tslib_menu {
 
                $menuItems = is_array($menuItemArray) ? $menuItemArray : $this->sys_page->getMenu($pid);
                foreach($menuItems as $uid => $data)    {
+
+                               // $data['_MP_PARAM'] contains MP param for overlay mount points (MPs with "substitute this page" set)
+                               // if present: add param to copy of MP array (copy used for that submenu branch only)
+                       $MP_array_sub = $MP_array;
+                       if (array_key_exists('_MP_PARAM', $data) && $data['_MP_PARAM']) {
+                               $MP_array_sub[] = $data['_MP_PARAM'];
+                       }
+                               // Set "&MP=" var:
+                       $MP_var = implode(',', $MP_array_sub);
+                       $MP_params = ($MP_var ? '&MP='.rawurlencode($MP_var) : '');
+
                        $spacer = (t3lib_div::inList($this->spacerIDList,$data['doktype'])?1:0);                // if item is a spacer, $spacer is set
                        if ($this->mconf['SPC'] || !$spacer)    {       // If the spacer-function is not enabled, spacers will not enter the $menuArr
                                if (!t3lib_div::inList($this->doktypeExcludeList,$data['doktype']) && (!$data['nav_hide'] || $this->conf['includeNotInMenu']) && !t3lib_div::inArray($banUidArray,$uid))        {               // Page may not be 'not_in_menu' or 'Backend User Section' + not in banned uid's
                                        if ($count<$levels)     {
-                                               $addLines = $this->generate_level($levels,$count+1,$data['uid'],'',$MP_array);
+                                               $addLines = $this->generate_level($levels, $count+1, $data['uid'], '', $MP_array_sub);
                                        } else {
                                                $addLines = '';
                                        }