diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-10-14 18:08:33 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-10-14 18:08:33 +0000 |
commit | 5d684e108eae96336f4e37b7648eadbf3bacf5a6 (patch) | |
tree | 399eadf13b87f255096528f1c8f31ee28eaddf31 /includes | |
parent | 162ca6eb98fcca82d6932ee03f48dd2f4855b72b (diff) | |
download | brdo-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.inc | 8 |
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; |