aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2016-01-29 11:47:30 +0100
committerplegall <plg@piwigo.org>2016-01-29 11:47:30 +0100
commit77888174cff00f8bdf8b0a4c04aca64b3fdcc5f4 (patch)
tree2c1736b57df65d1e61521662f22f65a079fa61a7
parentbc7316639f9208089ed3ab3debf313aca8ff986a (diff)
fixes #411, auth keys details on notification forms
-rw-r--r--admin/album_notification.php13
-rw-r--r--admin/notification_by_mail.php14
-rw-r--r--admin/themes/default/template/album_notification.tpl7
-rw-r--r--admin/themes/default/template/notification_by_mail.tpl10
-rw-r--r--language/en_UK/admin.lang.php2
-rw-r--r--language/fr_FR/admin.lang.php2
6 files changed, 48 insertions, 0 deletions
diff --git a/admin/album_notification.php b/admin/album_notification.php
index 492d555fd..fb2a1b027 100644
--- a/admin/album_notification.php
+++ b/admin/album_notification.php
@@ -205,6 +205,19 @@ $template->assign(
)
);
+if ($conf['auth_key_duration'] > 0)
+{
+ $template->assign(
+ 'auth_key_duration',
+ time_since(
+ strtotime('now -'.$conf['auth_key_duration'].' second'),
+ 'second',
+ null,
+ false
+ )
+ );
+}
+
// +-----------------------------------------------------------------------+
// | form construction |
// +-----------------------------------------------------------------------+
diff --git a/admin/notification_by_mail.php b/admin/notification_by_mail.php
index cd61964d0..ca3d4127c 100644
--- a/admin/notification_by_mail.php
+++ b/admin/notification_by_mail.php
@@ -719,6 +719,20 @@ switch ($page['mode'])
}
}
$template->assign($page['mode'], $tpl_var);
+
+ if ($conf['auth_key_duration'] > 0)
+ {
+ $template->assign(
+ 'auth_key_duration',
+ time_since(
+ strtotime('now -'.$conf['auth_key_duration'].' second'),
+ 'second',
+ null,
+ false
+ )
+ );
+ }
+
break;
}
}
diff --git a/admin/themes/default/template/album_notification.tpl b/admin/themes/default/template/album_notification.tpl
index 8573cf16e..1b3aa73bd 100644
--- a/admin/themes/default/template/album_notification.tpl
+++ b/admin/themes/default/template/album_notification.tpl
@@ -101,6 +101,13 @@ span.errors {
<textarea cols="50" rows="5" name="mail_content" id="mail_content" class="description">{$MAIL_CONTENT}</textarea>
</p>
+{if isset($auth_key_duration)}
+ <p>
+ {'Each email sent will contain its own automatic authentication key on links, valid for %s.'|translate:$auth_key_duration}
+ <br>{'For security reason, authentication keys do not work for administrators.'|translate}
+ </p>
+{/if}
+
<p class="actionButtons">
<input class="submit" type="submit" value="{'Send'|@translate}" name="submitEmail">
<span class="errors" style="display:none">&#x2718; {'No recipient selected'|translate}</span>
diff --git a/admin/themes/default/template/notification_by_mail.tpl b/admin/themes/default/template/notification_by_mail.tpl
index 0be49bdd1..95506616c 100644
--- a/admin/themes/default/template/notification_by_mail.tpl
+++ b/admin/themes/default/template/notification_by_mail.tpl
@@ -127,6 +127,16 @@ jQuery(document).ready(function(){
</table>
</fieldset>
+{if isset($auth_key_duration)}
+ <fieldset>
+ <legend>{'Informations'|@translate}</legend>
+ <p>
+ {'Each email sent will contain its own automatic authentication key on links, valid for %s.'|translate:$auth_key_duration}
+ <br>{'For security reason, authentication keys do not work for administrators.'|translate}
+ </p>
+ </fieldset>
+{/if}
+
<p>
<input type="submit" value="{'Send'|@translate}" name="send_submit">
</p>
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index 94d956398..ba130473d 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -988,3 +988,5 @@ $lang['Edit user'] = 'Edit user';
$lang['Recipients'] = 'Recipients';
$lang['No recipient selected'] = 'No recipient selected';
$lang['No user is permitted to see this private album'] = 'No user is permitted to see this private album';
+$lang['Each email sent will contain its own automatic authentication key on links, valid for %s.'] = 'Each email sent will contain its own automatic authentication key on links, valid for %s.';
+$lang['For security reason, authentication keys do not work for administrators.'] = 'For security reason, authentication keys do not work for administrators.'; \ No newline at end of file
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index 77fd06da9..4067a4e1b 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -989,3 +989,5 @@ $lang['Edit user'] = 'Éditer l\'utilisateur';
$lang['Recipients'] = 'Destinataires';
$lang['No recipient selected'] = 'Choisissez un destinataire';
$lang['No user is permitted to see this private album'] = 'Aucun utilisateur n\'est autorisé à voir cet album privé';
+$lang['Each email sent will contain its own automatic authentication key on links, valid for %s.'] = 'Chaque email envoyé contiendra sa propre clef d\'identification automatique sur les liens, valide %s.';
+$lang['For security reason, authentication keys do not work for administrators.'] = 'Par mesure de sécurité les clefs d\'identification ne fonctionnent pas pour les administrateurs.'; \ No newline at end of file