[TYPO3-core] RFC: #3493 IFSUB problems

Wolfgang Klinger wolfgang at stufenlos.net
Thu Aug 31 11:59:54 CEST 2006


 *hiya!*

 http://bugs.typo3.org/view.php?id=3493

 The method ifSub of tslib_menu does not check the pages with the
 current language and had some other flaws in the past.

 This patch should solve everything because it relies on another method
 that does exactly the same checks as currently plus some more 
 (what was missing until yet)

 Please test it.


 bye
 Wolfgang

-------------- next part --------------
Index: typo3/sysext/cms/tslib/class.tslib_menu.php
===================================================================
--- typo3/sysext/cms/tslib/class.tslib_menu.php (revision 1700)
+++ typo3/sysext/cms/tslib/class.tslib_menu.php (working copy)
@@ -1340,10 +1340,13 @@
                        $uid = $mount_info['mount_pid'];
                }

+               $banUidArray = $this->getBannedUids();
                $recs = $this->sys_page->getMenu($uid,'uid,pid,doktype,mount_pid,mount_pid_ol,nav_hide,shortcut,shortcut_mode');
+
                foreach($recs as $theRec)       {
-                       if (!t3lib_div::inList($this->doktypeExcludeList,$theRec['doktype']) && (!$theRec['nav_hide'] || $this->conf['includeNotInMenu']))   {
        // If a menu item seems to be another type than 'Not in menu', then return true (there were items!)
-                               return TRUE;
+                       $spacer = t3lib_div::inList($this->spacerIDList,$theRec['doktype']);
+                       if ($this->filterMenuPages($theRec, $banUidArray, $spacer))     {
+                                       return TRUE;
                        }
                }
        }


More information about the TYPO3-team-core mailing list