Correct the "inappropriate intimacy" smell that bharat's refined senses pick up

This commit is contained in:
Tim Almdal
2009-06-17 13:34:18 -07:00
parent 5b767b6443
commit a6a9b256ae
3 changed files with 14 additions and 28 deletions
+1 -14
View File
@@ -69,23 +69,10 @@ class Admin_View_Core extends View {
}
}
$this->_remove_empty_items($menu);
$menu->compact();
print $menu;
}
private function _remove_empty_items($menu) {
foreach ($menu->elements as $target_id => $element) {
if ($element->type == "submenu") {
if (empty($element->elements)) {
$menu->remove($target_id);
} else {
$this->_remove_empty_items($element);
}
}
}
}
/**
* Print out any site wide status information.
*/