[BUGFIX] stdWrap for special.value applied twice 87/21687/2
authorMarkus Klein <klein.t3@mfc-linz.at>
Fri, 14 Sep 2012 07:28:59 +0000 (09:28 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 29 Jun 2013 10:54:34 +0000 (12:54 +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/21687
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/frontend/Classes/ContentObject/HierarchicalMenuContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

index 11dd55f..122dc7d 100644 (file)
@@ -48,12 +48,6 @@ class HierarchicalMenuContentObject extends \TYPO3\CMS\Frontend\ContentObject\Ab
                        try {
                                $menuObjectFactory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\Menu\\MenuContentObjectFactory');
                                $menu = $menuObjectFactory->getMenuObjectByType($menuType);
-                               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;
index 177f229..8f76d63 100644 (file)
@@ -1672,12 +1672,16 @@ class AbstractMenuContentObject {
         * @todo Define visibility
         */
        public function getBannedUids() {
-               $banUidArray = array();
-               if (trim($this->conf['excludeUidList'])) {
-                       $banUidList = str_replace('current', $GLOBALS['TSFE']->page['uid'], $this->conf['excludeUidList']);
-                       $banUidArray = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $banUidList);
+               $excludeUidList = isset($this->conf['excludeUidList.'])
+                       ? $this->parent_cObj->stdWrap($this->conf['excludeUidList'], $this->conf['excludeUidList.'])
+                       : $this->conf['excludeUidList'];
+
+               if (!trim($excludeUidList)) {
+                       return array();
                }
-               return $banUidArray;
+
+               $banUidList = str_replace('current', $GLOBALS['TSFE']->page['uid'], $excludeUidList);
+               return \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $banUidList);
        }
 
        /**