From b6457719daa116698caeb2b42ee415870d5bf7e9 Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 24 Feb 2011 13:49:48 +0000 Subject: ability to to display the album name as a single link and not several links depending on uppercats, with get_cat_display_name_cache git-svn-id: http://piwigo.org/svn/trunk@9367 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_html.inc.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index 0d7c6e97f..9e422288e 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -111,7 +111,9 @@ function get_cat_display_name($cat_informations, */ function get_cat_display_name_cache($uppercats, $url = '', - $replace_space = true) + $replace_space = true, + $single_link = false, + $link_class = null) { global $cache, $conf; @@ -125,6 +127,16 @@ SELECT id, name, permalink } $output = ''; + if ($single_link) + { + $single_url = get_root_url().$url.array_pop(explode(',', $uppercats)); + $output.= ''.$cat['name'].''; } } + + if ($single_link and isset($single_url)) + { + $output.= ''; + } + if ($replace_space) { return replace_space($output); -- cgit v1.2.3