diff options
author | plegall <plg@piwigo.org> | 2016-01-06 14:41:25 +0100 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2016-01-06 14:41:25 +0100 |
commit | 646aa6f19a45618abaf35f1b889d421e9c184bc9 (patch) | |
tree | 96eff284a7f90fc24327cea3a9714a6b6e79365d /include/functions_html.inc.php | |
parent | aa581bd3dec54984845096e3a73d1ce72c6922bb (diff) | |
parent | 426e10e235689211fc52ee0077dce32ea3124bd6 (diff) |
Merge branch 'feature/392-auth-keys'
Diffstat (limited to 'include/functions_html.inc.php')
-rw-r--r-- | include/functions_html.inc.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index 8668e68ad..59861c46d 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -103,10 +103,17 @@ function get_cat_display_name($cat_informations, $url='') function get_cat_display_name_cache($uppercats, $url = '', $single_link = false, - $link_class = null) + $link_class = null, + $auth_key=null) { global $cache, $conf; + $add_url_params = array(); + if (isset($auth_key)) + { + $add_url_params['auth'] = $auth_key; + } + if (!isset($cache['cat_names'])) { $query = ' @@ -119,7 +126,7 @@ SELECT id, name, permalink $output = ''; if ($single_link) { - $single_url = get_root_url().$url.array_pop(explode(',', $uppercats)); + $single_url = add_url_params(get_root_url().$url.array_pop(explode(',', $uppercats)), $add_url_params); $output.= '<a href="'.$single_url.'"'; if (isset($link_class)) { @@ -155,10 +162,13 @@ SELECT id, name, permalink { $output.= ' <a href="' - .make_index_url( + .add_url_params( + make_index_url( array( 'category' => $cat, ) + ), + $add_url_params ) .'">'.$cat['name'].'</a>'; } |