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.
This commit is contained in:
plegall
2015-12-31 19:59:08 +01:00
parent eee57a5d2e
commit 4aeedb5a2e
7 changed files with 181 additions and 21 deletions
+13 -13
View File
@@ -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(