summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-11-21 19:08:46 +0000
committerDries Buytaert <dries@buytaert.net>2003-11-21 19:08:46 +0000
commite4d791fe0d5a70867448c9fd5b2d03b9d69b98a0 (patch)
tree0b774ecd8d9a5d8d3f34acd709d33f47a92c77ed /includes
parent5963759e5df55096ba85d39c0d038d3e3f3b2228 (diff)
downloadbrdo-e4d791fe0d5a70867448c9fd5b2d03b9d69b98a0.tar.gz
brdo-e4d791fe0d5a70867448c9fd5b2d03b9d69b98a0.tar.bz2
- Menu fix by Jonathan.
Diffstat (limited to 'includes')
-rw-r--r--includes/menu.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index e8276b38a..12c4132e4 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -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";
}
}