Actions
Bug #25405
closedregister['count_menuItems'] wrong, if filtered by userfunc
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-03-28
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
4.6
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
the register['count_menuItems'] is set, before a possible userfunc filters the menu items -> wrong register value.
2 possible solutions:
a) change call sequence
b) require the userfunc to update the register.
I would prefer a) as b) is not very obviuos and the userfunc will could still get the count by simply using php count on the array if necessary.
// Setting number of menu items
$GLOBALS['TSFE']->register['count_menuItems'] = count($this->menuArr);
// Passing the menuArr through a user defined function:
if ($this->mconf['itemArrayProcFunc']) {
if (!is_array($this->parentMenuArr)) {$this->parentMenuArr=array();}
$this->menuArr = $this->userProcess('itemArrayProcFunc',$this->menuArr);
}
(issue imported from #M18050)
Actions