aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_html.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2016-01-04 19:54:40 +0100
committerplegall <plg@piwigo.org>2016-01-04 19:54:40 +0100
commit67e142f33197af955e179a1ad09b990ac80b6698 (patch)
tree914d524eb8f5ac3f92703e1f8790f74682d57bdf /include/functions_html.inc.php
parentf2f9e5ecb7d6c16332aaccf8bc7b1c4248e6e889 (diff)
feature #392, add authentication key in NBM mails
There are many links in NBM (Notification By Mail, see screen [Administration > Users > Notification]). I had to change several functions to take this authentication key into account.
Diffstat (limited to 'include/functions_html.inc.php')
-rw-r--r--include/functions_html.inc.php16
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>';
}