aboutsummaryrefslogtreecommitdiffstats
path: root/admin/album_notification.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2015-12-31 19:59:08 +0100
committerplegall <plg@piwigo.org>2015-12-31 19:59:08 +0100
commit4aeedb5a2ea455c503721de29a35e8a3c1fa0a9d (patch)
tree1e5892d3f32f1491d85067cc9def93270649c8c6 /admin/album_notification.php
parenteee57a5d2ece31f9b99485f82a310b80d8fa3935 (diff)
feature #392, authentication keys, album notification
* On album notification (for a group), sends one distinct email for each user with a new authentication key. * When someone clicks the link with auth=<key> in URL, if the user is not already connected, Piwigo will automatically connect the user.
Diffstat (limited to 'admin/album_notification.php')
-rw-r--r--admin/album_notification.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/admin/album_notification.php b/admin/album_notification.php
index cafaad170..4dd578b1a 100644
--- a/admin/album_notification.php
+++ b/admin/album_notification.php
@@ -54,6 +54,8 @@ if (isset($_POST['submitEmail']) and !empty($_POST['group']))
is empty find child representative_picture_id */
if (!empty($category['representative_picture_id']))
{
+ $img = array();
+
$query = '
SELECT id, file, path, representative_ext
FROM '.IMAGES_TABLE.'
@@ -65,21 +67,19 @@ SELECT id, file, path, representative_ext
{
$element = pwg_db_fetch_assoc($result);
- $img_url = '<a href="'.
- make_picture_url(array(
- 'image_id' => $element['id'],
- 'image_file' => $element['file'],
- 'category' => $category
- ))
- .'" class="thumblnk"><img src="'.DerivativeImage::url(IMG_THUMB, $element).'"></a>';
+ $img = array(
+ 'link' => make_picture_url(
+ array(
+ 'image_id' => $element['id'],
+ 'image_file' => $element['file'],
+ 'category' => $category
+ )
+ ),
+ 'src' => DerivativeImage::url(IMG_THUMB, $element),
+ );
}
}
- if (!isset($img_url))
- {
- $img_url = '';
- }
-
pwg_mail_group(
$_POST['group'],
array(
@@ -90,7 +90,7 @@ SELECT id, file, path, representative_ext
array(
'filename' => 'cat_group_info',
'assign' => array(
- 'IMG_URL' => $img_url,
+ 'IMG' => $img,
'CAT_NAME' => trigger_change('render_category_name', $category['name'], 'admin_cat_list'),
'LINK' => make_index_url(array(
'category' => array(