diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-10-27 14:00:32 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-10-27 14:00:32 -0700 |
commit | 13faf6035d726f8a77b7dcac7e8e8fa3b24bfaf2 (patch) | |
tree | c458a11bbe520834ffd20ffe9ccc35e30152a458 /modules/gallery/libraries/Menu.php | |
parent | 3b66ea3c3a4889c3ab3a2da0626fa5b554c1a7c9 (diff) |
Remove Menu::compact() in favor of putting an if-then clause in
menu.html.php. This serves two purposes:
1) It's more efficient since we're doing less passes over the Menu tree
2) We're allowing themers to decide whether or not to show empty menus
Diffstat (limited to 'modules/gallery/libraries/Menu.php')
-rw-r--r-- | modules/gallery/libraries/Menu.php | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php index 22261557..fba21e09 100644 --- a/modules/gallery/libraries/Menu.php +++ b/modules/gallery/libraries/Menu.php @@ -155,19 +155,6 @@ class Menu_Core extends Menu_Element { } } - public function compact() { - foreach ($this->elements as $target_id => $element) { - if ($element->type == "submenu") { - if (empty($element->elements)) { - $this->remove($target_id); - } else { - $element->compact(); - } - } - } - return $this; - } - public function __construct($type) { parent::__construct($type); $this->elements = array(); |