- Menu fix by Jonathan.

4.4.x
Dries Buytaert 2003-11-21 19:08:46 +00:00
parent 5963759e5d
commit e4d791fe0d
1 changed files with 5 additions and 2 deletions

View File

@ -134,7 +134,7 @@ function menu_in_active_trail($path) {
/**
* Returns a rendered menu tree.
*/
function menu_tree($parent = "") {
function menu_tree($parent = "", $hidden = 0) {
global $_list;
static $trail;
@ -161,9 +161,12 @@ function menu_tree($parent = "") {
}
$output .= "</li>\n";
}
else if ($_list[$item]["hidden"] == 1 && $_list[$item]["children"]) {
$output .= menu_tree($item, 1);
}
}
if ($output != '') {
if ($output != '' && $hidden != 1) {
$output = "\n<ul>\n$output\n</ul>\n";
}
}