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

index 561ee04..77fe6ef 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 372287c..f9ec509 100644 (file)
@@ -1674,12 +1674,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);
        }
 
        /**
@@ -1791,4 +1795,4 @@ class AbstractMenuContentObject {
 }
 
 
-?>
\ No newline at end of file
+?>