[Tickets #10381] Re: horde and imp apps-menus get mixed up in dynamic view

bugs at horde.org bugs at horde.org
Tue Dec 6 07:51:54 UTC 2011


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/10381
------------------------------------------------------------------------------
  Ticket             | 10381
  Updated By         | Michael Slusarz <slusarz at horde.org>
  Summary            | horde and imp apps-menus get mixed up in dynamic view
  Queue              | IMP
  Version            | 5.0.8
  Type               | Bug
  State              | Assigned
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Horde Developers
------------------------------------------------------------------------------


Michael Slusarz <slusarz at horde.org> (2011-12-06 00:51) wrote:

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.





More information about the bugs mailing list