⚲
Project
General
Profile
Sign in
Home
Projects
Help
Search
:
TYPO3 Core
All Projects
TYPO3 Core
Overview
Activity
Roadmap
Issues
Repository
Download (1.24 KB)
Feature #17650
» bug6452.txt
Administrator Admin, 2008-01-03 16:44
--- class.tslib_menu.php 2008-01-03 16:18:32.000000000 +0100
+++ class.tslib_menu_neu.php 2007-10-29 06:35:26.000000000 +0100
@@ -797,7 +797,8 @@
$minItems = intval($this->mconf['minItems'] ? $this->mconf['minItems'] : $this->conf['minItems']);
$maxItems = intval($this->mconf['maxItems'] ? $this->mconf['maxItems'] : $this->conf['maxItems']);
$begin = tslib_cObj::calc($this->mconf['begin'] ? $this->mconf['begin'] : $this->conf['begin']);
-
+ $endat = tslib_cObj::calc($this->mconf['end'] ? $this->mconf['end'] : $this->conf['end']);
+
$banUidArray = $this->getBannedUids();
// Fill in the menuArr with elements that should go into the menu:
@@ -814,7 +815,29 @@
break;
}
}
+ if ($endat>0 && $endat<=$c_b) {
+ break;
+ }
+ }
+ }
+ //delete last items if endat is negative
+ if ($endat<0) {
+ $_end=$c+$endat;
+ if ($_end<0)
+ $_end=0;
+ for ($i=$c;$i>=$_end; $i--) {
+ unset($this->menuArr[$i]);
+ }
+ }
+ //delete the first items if begin was negative
+ if ($begin<0) {
+ $_begin=$c+$begin;
+ if ($_begin<0)
+ $_begin=0;
+ for ($i=0; $i<$_begin; $i++) {
+ array_shift($this->menuArr);
}
+
}
// Fill in fake items, if min-items is set.
« Previous
1
2
Next »
(1-1/2)
Loading...