diff options
author | plegall <plg@piwigo.org> | 2005-09-25 18:31:55 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2005-09-25 18:31:55 +0000 |
commit | 8f058fcc9bcff868a29be0e8077eb7fed1b37f6f (patch) | |
tree | 89ac5a2622a388417f1d1f514b0531c86091af5b /include/functions_html.inc.php | |
parent | 4c949342ec4f6a7479396385af592cf8630ff79f (diff) |
- bug fixed: HTML error on nested UL in categories menu.
- bug 161 fixed: guest_id not taken into account for history table insert.
- bug 164 fixed: category inserted in history table becomes too long if HTML
tags are kept.
git-svn-id: http://piwigo.org/svn/trunk@876 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/functions_html.inc.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index ae5d5ef47..b49533db4 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -339,21 +339,26 @@ function get_html_menu_category($categories) global $page, $lang; $ref_level = 0; - $menu = ' - <ul class="menu">'; + $menu = ''; foreach ($categories as $category) { - $level = substr_count($category['global_rank'], '.'); + $level = substr_count($category['global_rank'], '.') + 1; if ($level > $ref_level) { $menu.= ' - <ul class="menu">'; + <ul>'; + } + else if ($level == $ref_level) + { + $menu.= ' + </li>'; } else if ($level < $ref_level) { // we may have to close more than one level at the same time... $menu.= str_repeat("\n</ul>",($ref_level-$level)); + $menu.= "\n</li>"; } $ref_level = $level; @@ -382,12 +387,9 @@ function get_html_menu_category($categories) $menu.= '</span>'; $menu.= get_icon($category['date_last']); } - - $menu.= ' - </li>'; } - $menu.= ' + $menu.= '</li> </ul>'; return $menu; |