6.0.0-beta1
7/16/25

[#10381] horde and imp apps-menus get mixed up in dynamic view
Summary horde and imp apps-menus get mixed up in dynamic view
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners Horde Developers (at)
Requester thpo+horde (at) dotrc (dot) de
Created 07/26/2011 (5104 days ago)
Due
Updated 12/16/2011 (4961 days ago)
Assigned 07/26/2011 (5104 days ago)
Resolved 12/16/2011 (4961 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
12/16/2011 06:27:26 AM Michael Slusarz Comment #9
Version ⇒ Git master
Queue ⇒ Horde Framework Packages
State ⇒ Resolved
Reply to this comment
Fixed in Horde_Core.
12/16/2011 06:26:56 AM Git Commit Comment #8 Reply to this comment
Changes have been made in Git for this ticket:

[mms] Fix merging config data (Bug #10381).

  4 files changed, 184 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/c9274cd01b407ed251d4a130943ef146e71278d1
12/06/2011 07:51:54 AM Michael Slusarz Comment #7 Reply to this comment
Unfortunately, this is expected.  array_replace_recursive() does the 
following:

$a1 = array('a', 'b', 'c');
$a2 = array('d');

array_replace_recursive($a1, $a2) = array('d', 'b', 'c');

What we really want in this case is actually just: array('d').  In 
other words, we want the value of $conf['menu']['apps'] in imp to 
completely overwrite the value of $conf['menu']['apps'] from horde.   
This is because these arrays are nothing more than lists.  If an array 
is a list (as opposed to a hash map), it should be directly replaced.

However, PHP does not provide an API to determine if an array is 
currently a list or a hash map.  We could fake around it by doing 
something like checking if every key is a number and, if so, we would 
treat that array as a list and overwrite it with an applications list. 
  Or we have to specially treat the menu/apps config option within 
Horde_Registry.
07/26/2011 11:52:19 AM Jan Schneider Comment #6
Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
Reply to this comment
Ah, I misread your initial comment. It about the duplicate, not the 
merging of both configuration settings.
07/26/2011 11:23:32 AM thpo+horde (at) dotrc (dot) de Comment #5 Reply to this comment
Well, it is not the behaviour I would expect. Having turba twice in 
the menu, but no entry for ansel is a irritating for me as a user.

07/26/2011 11:13:57 AM Jan Schneider Comment #4
State ⇒ Not A Bug
Reply to this comment
That's the expected behavior then.
07/26/2011 10:57:15 AM thpo+horde (at) dotrc (dot) de Comment #3 Reply to this comment
Sorry, I forgot to mention that both these greps were done in the 
horde-base directory. So yes, one is on the turba config and the 
second on the horde config.
07/26/2011 10:33:28 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Are you sure you don't have that menu array in horde/config/conf.php 
instead of Turba?
07/26/2011 06:45:16 AM thpo+horde (at) dotrc (dot) de Comment #1
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ horde and imp apps-menus get mixed up in dynamic view
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
Given the following setting in my configuration files:

# grep turba imp/config/conf.php
$conf['menu']['apps'] = array('turba');
# grep turba config/conf.php
$conf['menu']['apps'] = array('ansel', 'imp', 'kronolith', 'turba');

the resulting menu in the dynamic view of imp is like:
turba
imp
kronolith
turba

Saved Queries