[BUGFIX] stdWrap for special.value applied twice 39/21739/2
authorMarkus Klein <klein.t3@mfc-linz.at>
Sat, 29 Jun 2013 20:24:30 +0000 (22:24 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Tue, 16 Jul 2013 21:11:03 +0000 (23:11 +0200)
In HMENU the stdWrap for special.value is applied twice.
This patches removes the superfluous call
in HierarchicalMenuContentObject.php.

Furthermore it also moves the stdWrap for excludeUidList
to AbstractMenuContentObject.php for consistency reasons.

Change-Id: Ia6594a76602acdab8b39d50803595343e65f6d02
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Fixes: #40855
Reviewed-on: https://review.typo3.org/21739
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/cms/tslib/class.tslib_menu.php
typo3/sysext/cms/tslib/content/class.tslib_content_hierarchicalmenu.php

index 42cb6c8..f88631d 100644 (file)
@@ -1662,14 +1662,16 @@ class tslib_menu {
         * @access private
         */
        function getBannedUids() {
-               $banUidArray = array();
+               $excludeUidList = isset($this->conf['excludeUidList.'])
+                       ? $this->parent_cObj->stdWrap($this->conf['excludeUidList'], $this->conf['excludeUidList.'])
+                       : $this->conf['excludeUidList'];
 
-               if (trim($this->conf['excludeUidList']))        {
-                       $banUidList = str_replace('current', $GLOBALS['TSFE']->page['uid'], $this->conf['excludeUidList']);
-                       $banUidArray = t3lib_div::intExplode(',', $banUidList);
+               if (!trim($excludeUidList)) {
+                       return array();
                }
 
-               return $banUidArray;
+               $banUidList = str_replace('current', $GLOBALS['TSFE']->page['uid'], $excludeUidList);
+               return t3lib_div::intExplode(',', $banUidList);
        }
 
        /**
index 6f6a2cf..37e0da0 100644 (file)
@@ -50,15 +50,6 @@ class tslib_content_HierarchicalMenu extends tslib_content_Abstract {
                        $cls = strtolower($conf[1]);
 
                        if (t3lib_div::inList($GLOBALS['TSFE']->tmpl->menuclasses, $cls)) {
-
-                               if (isset($conf['excludeUidList.'])) {
-                                       $conf['excludeUidList'] = $this->cObj->stdWrap($conf['excludeUidList'], $conf['excludeUidList.']);
-                               }
-
-                               if (isset($conf['special.']['value.'])) {
-                                       $conf['special.']['value'] = $this->cObj->stdWrap($conf['special.']['value'], $conf['special.']['value.']);
-                               }
-
                                $GLOBALS['TSFE']->register['count_HMENU']++;
                                $GLOBALS['TSFE']->register['count_HMENU_MENUOBJ'] = 0;
                                $GLOBALS['TSFE']->register['count_MENUOBJ'] = 0;