6.0.0-beta1
7/7/25

[#11731] Horde_Menu: different behavior of function add() and addArray()
Summary Horde_Menu: different behavior of function add() and addArray()
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester heinz (at) htl-steyr (dot) ac (dot) at
Created 11/20/2012 (4612 days ago)
Due
Updated 11/20/2012 (4612 days ago)
Assigned
Resolved 11/20/2012 (4612 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/20/2012 06:55:14 PM Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
 
11/20/2012 06:43:18 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit e5a6ad78ac1a0bcb0ec6ca103afa1196a65b20fd
Author: Jan Schneider <jan@horde.org>
Date:   Tue Nov 20 19:42:57 2012 +0100

     Default 'class' to null like in add() (Bug #11731).

  framework/Core/lib/Horde/Menu.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/e5a6ad78ac1a0bcb0ec6ca103afa1196a65b20fd
11/20/2012 03:36:49 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #1
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Horde_Menu: different behavior of function add() and addArray()
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
Hi
If parameter class is omitted, functions add() and addArray() defaults 
to different values:
add() defaults to: $class = null
addArray() defaults to: 'class' => ''

This causes different behavior of the to functions if I use them to 
add menu entries in the sidebar menu of my own application (class 
omitted).

Using addArray sets class to '' and the current selected menuentry 
isn't highlighted in this case.

This peculiarity should be corrected or documented better!

Heinz

Saved Queries