aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-11-18 22:42:35 +0000
committerplegall <plg@piwigo.org>2005-11-18 22:42:35 +0000
commitdb658fcbe1415abc860941d89b21f5461bc789c6 (patch)
treed174b05c45cfe91158f9516b8d60e63abe4edec9 /include
parentf280ff4b171e1c3b6150794ac8a875b00e4f7522 (diff)
- bug fixed: UL/LI tags were not correctly closed in category menu tree.
git-svn-id: http://piwigo.org/svn/branches/branch-1_5@940 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/functions_html.inc.php23
1 files changed, 8 insertions, 15 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index 21dcf0834..c08ca525e 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -346,25 +346,21 @@ function get_html_menu_category($categories)
$level = substr_count($category['global_rank'], '.') + 1;
if ($level > $ref_level)
{
- $menu.= '
- <ul>';
+ $menu.= "\n<ul>";
}
else if ($level == $ref_level)
{
- $menu.= '
- </li>';
+ $menu.= "\n</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>";
+ $menu.= str_repeat("\n</ul></li>",($ref_level-$level));
}
$ref_level = $level;
- $menu.= '
-
- <li';
+ $menu.= "\n\n".'<li';
if (isset($page['cat'])
and is_numeric($page['cat'])
and $category['id'] == $page['cat'])
@@ -374,13 +370,11 @@ function get_html_menu_category($categories)
$menu.= '>';
$url = add_session_id(PHPWG_ROOT_PATH.'category.php?cat='.$category['id']);
- $menu.= '
- <a href="'.$url.'">'.$category['name'].'</a>';
+ $menu.= "\n".'<a href="'.$url.'">'.$category['name'].'</a>';
if ($category['nb_images'] > 0)
{
- $menu.= '
- <span class="menuInfoCat"';
+ $menu.= "\n".'<span class="menuInfoCat"';
$menu.= ' title="'.$category['nb_images'];
$menu.= ' '.$lang['images_available'].'">';
$menu.= '['.$category['nb_images'].']';
@@ -388,9 +382,8 @@ function get_html_menu_category($categories)
$menu.= get_icon($category['date_last']);
}
}
-
- $menu.= '</li>
- </ul>';
+
+ $menu.= str_repeat("\n</li></ul>",($level));
return $menu;
}