[BUGFIX] excludeUidList not checked for ifsub state 39/20039/2
authorJigal van Hemert <jigal@xs4all.nl>
Fri, 19 Apr 2013 19:17:31 +0000 (21:17 +0200)
committerJigal van Hemert <jigal@xs4all.nl>
Fri, 19 Apr 2013 19:35:55 +0000 (21:35 +0200)
For menu item states IFSUB(RO), ACTIFSUB(RO) and CURIFSUB(RO) the
excludeUidList was not checked. If all submenu items are excluded the
menu item doesn't get the "ifsub" state anymore.

Change-Id: Ia113bb187b778718a501e0f2f6c0956c99cb1d8a
Fixes: #45254
Releases: 6.1, 6.0, 4.7, 4.5
Reviewed-on: https://review.typo3.org/20039
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
typo3/sysext/cms/tslib/class.tslib_menu.php

index 5df5f8a..42cb6c8 100644 (file)
@@ -1483,6 +1483,7 @@ class tslib_menu {
                );
 
                $hasSubPages = FALSE;
+               $bannedUids = $this->getBannedUids();
                foreach ($recs as $theRec) {
                                // no valid subpage if the document type is excluded from the menu
                        if (t3lib_div::inList($this->doktypeExcludeList, $theRec['doktype'])) {
@@ -1507,7 +1508,10 @@ class tslib_menu {
                        if ($GLOBALS['TSFE']->sys_language_uid && $hideIfNotTranslated && !$theRec['_PAGES_OVERLAY']) {
                                continue;
                        }
-
+                               // no valid subpage if the subpage is banned by excludeUidList
+                       if (in_array($theRec['uid'], $bannedUids)) {
+                               continue;
+                       }
                        $hasSubPages = TRUE;
                        break;
                }