Bug #25405
closedregister['count_menuItems'] wrong, if filtered by userfunc
100%
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)
Updated by Mr. Hudson about 13 years ago
Patch set 1 of change I0425d04602110a5f6707022cb88077cc75e81f02 has been pushed to the review server.
It is available at http://review.typo3.org/1471
Updated by Mr. Hudson about 13 years ago
Patch set 1 of change I3b7b8747309d57fcece2db949974530c38ba5bb2 has been pushed to the review server.
It is available at http://review.typo3.org/1473
Updated by Björn Pedersen about 13 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset bb174015e88d7a6d90eec6d7fb07ddb86a84099d.