Added feature #7337: stdWrap for menu > range & entrylevel
authorIngmar Schlecht <ingmar.schlecht@typo3.org>
Fri, 22 Feb 2008 20:16:07 +0000 (20:16 +0000)
committerIngmar Schlecht <ingmar.schlecht@typo3.org>
Fri, 22 Feb 2008 20:16:07 +0000 (20:16 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3259 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_menu.php

index 4e0f0c2..7091c08 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@
 
        * Added feature #7526: Making loginNews look nicer (Thanks to Steffen Kamper)
        * Added feature #4553: Enable negative timestamps, so the date/datetime fields now support dates starting from 1902 instead of 1970. This is possible on all platforms since PHP 5.1. (Thanks to Steffen Kamper)
 
        * Added feature #7526: Making loginNews look nicer (Thanks to Steffen Kamper)
        * Added feature #4553: Enable negative timestamps, so the date/datetime fields now support dates starting from 1902 instead of 1970. This is possible on all platforms since PHP 5.1. (Thanks to Steffen Kamper)
+       * Added feature #7337: stdWrap for menu > range & entrylevel (Thanks to Georg Ringer)
        * Fixed bug #7158: DBAL fixes to Indexed Search backend module (Thanks to Moreno Feltscher)
        * Issue #7508: Slight improvement of BE user label in backend.php (Thanks to Steffen Kamper)
 
        * Fixed bug #7158: DBAL fixes to Indexed Search backend module (Thanks to Moreno Feltscher)
        * Issue #7508: Slight improvement of BE user label in backend.php (Thanks to Steffen Kamper)
 
index a5b852c..ab0ba94 100755 (executable)
@@ -247,10 +247,11 @@ class tslib_menu {
                                $exclDoktypeArr = t3lib_div::removeArrayEntryByValue($exclDoktypeArr,'5');
                                $this->doktypeExcludeList = implode(',',$exclDoktypeArr);
                        }
                                $exclDoktypeArr = t3lib_div::removeArrayEntryByValue($exclDoktypeArr,'5');
                                $this->doktypeExcludeList = implode(',',$exclDoktypeArr);
                        }
-
                                // EntryLevel
                                // EntryLevel
-                       $this->entryLevel = tslib_cObj::getKey ($conf['entryLevel'],$this->tmpl->rootLine);
-
+                       $this->entryLevel = tslib_cObj::getKey (
+                               $this->parent_cObj->stdWrap($conf['entryLevel'], $conf['entryLevel.']),
+                               $this->tmpl->rootLine
+                       );
                                // Set parent page: If $id not stated with start() then the base-id will be found from rootLine[$this->entryLevel]
                        if ($id)        {       // Called as the next level in a menu. It is assumed that $this->MP_array is set from parent menu.
                                $this->id = intval($id);
                                // Set parent page: If $id not stated with start() then the base-id will be found from rootLine[$this->entryLevel]
                        if ($id)        {       // Called as the next level in a menu. It is assumed that $this->MP_array is set from parent menu.
                                $this->id = intval($id);
@@ -609,7 +610,10 @@ class tslib_menu {
                                                        $extraWhere.= ' AND pages.no_search=0';
                                                }
                                                        // start point
                                                        $extraWhere.= ' AND pages.no_search=0';
                                                }
                                                        // start point
-                                               $eLevel = tslib_cObj::getKey (intval($this->conf['special.']['entryLevel']),$this->tmpl->rootLine);
+                                               $eLevel = tslib_cObj::getKey(
+                                                       $this->parent_cObj->stdWrap($this->conf['special.']['entryLevel'], $this->conf['special.']['entryLevel.']),
+                                                       $this->tmpl->rootLine
+                                               );
                                                $startUid = intval($this->tmpl->rootLine[$eLevel]['uid']);
 
                                                        // which field is for keywords
                                                $startUid = intval($this->tmpl->rootLine[$eLevel]['uid']);
 
                                                        // which field is for keywords
@@ -640,9 +644,11 @@ class tslib_menu {
                                                }
                                        break;
                                        case 'rootline':
                                                }
                                        break;
                                        case 'rootline':
-                                               $begin_end = explode('|',$this->conf['special.']['range']);
-                                               if (!t3lib_div::testInt($begin_end[0])) {intval($begin_end[0]);}
-                                               if (!t3lib_div::testInt($begin_end[1])) {$begin_end[1]=-1;}
+                                               $begin_end = explode('|', $this->parent_cObj->stdWrap($this->conf['special.']['range'], $this->conf['special.']['range.']));
+                                               $begin_end[0] = intval($begin_end[0]);
+                                               if (!t3lib_div::testInt($begin_end[1])) {
+                                                       $begin_end[1] = -1;
+                                               }
 
                                                $beginKey = tslib_cObj::getKey ($begin_end[0],$this->tmpl->rootLine);
                                                $endKey = tslib_cObj::getKey ($begin_end[1],$this->tmpl->rootLine);
 
                                                $beginKey = tslib_cObj::getKey ($begin_end[0],$this->tmpl->rootLine);
                                                $endKey = tslib_cObj::getKey ($begin_end[1],$this->tmpl->rootLine);