Project

General

Profile

Actions

Bug #25405

closed

register['count_menuItems'] wrong, if filtered by userfunc

Added by Björn Pedersen about 13 years ago. Updated over 5 years ago.

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 #1

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

Actions #2

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

Actions #3

Updated by Björn Pedersen about 13 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF