summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-10-14 18:08:33 +0000
committerDries Buytaert <dries@buytaert.net>2003-10-14 18:08:33 +0000
commit5d684e108eae96336f4e37b7648eadbf3bacf5a6 (patch)
tree399eadf13b87f255096528f1c8f31ee28eaddf31 /includes
parent162ca6eb98fcca82d6932ee03f48dd2f4855b72b (diff)
downloadbrdo-5d684e108eae96336f4e37b7648eadbf3bacf5a6.tar.gz
brdo-5d684e108eae96336f4e37b7648eadbf3bacf5a6.tar.bz2
- Bugfix: stopped the menu system from generating empty lists (<ul></ul>). Patch
by Nick (CodeMonkeyX). - Bugfix: anonymous users could not change comment settings. Patch by Bart. - Bugfix: the comment control form always showed "order by date - newest first", no matter what order you selected. Patch by Bart. - Small usability improvement: only display comment controls when there are comments to show. Patch by Bart.
Diffstat (limited to 'includes')
-rw-r--r--includes/menu.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index ca2088fef..7cb17459a 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -135,7 +135,8 @@ function menu_tree($parent = "") {
}
if ($_list[$parent]["children"]) {
- $output = "\n<ul>\n";
+ $output = "";
+
usort($_list[$parent]["children"], "_menu_sort");
foreach ($_list[$parent]["children"] as $item) {
/*
@@ -153,7 +154,10 @@ function menu_tree($parent = "") {
$output .= "</li>\n";
}
}
- $output .= "</ul>\n";
+
+ if ($output != '') {
+ $output = "\n<ul>\n$output\n</ul>\n";
+ }
}
return $output;