diff --git a/framework/Core/lib/Horde/Menu.php b/framework/Core/lib/Horde/Menu.php index 056612abd98..08f9bf38d5c 100644 --- a/framework/Core/lib/Horde/Menu.php +++ b/framework/Core/lib/Horde/Menu.php @@ -54,7 +54,9 @@ public function add($url, $text, $icon = '', $icon_path = null, /** * Add an item to the menu array. * - * @param array $item The item to add. Valid keys: + * @param mixed $item The item to add. Either a string containing the + * value 'separator' or an array contianing the + * following valid keys: *
* 'class' - (string) CSS classname. * 'icon' - (string) Filename of the image icon. @@ -70,6 +72,11 @@ public function add($url, $text, $icon = '', $icon_path = null, */ public function addArray($item) { + if (!is_array($item) && $item == 'separator') { + $this->_menu[] = $item; + return; + } + if (!isset($item['url'])) { $item['url'] = new Horde_Url(); } elseif (!($item['url'] instanceof Horde_Url)) {