mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-28 04:09:56 +03:00
fixes #412, warn visitor if auth key no longer valid
This commit is contained in:
parent
77888174cf
commit
a12425629e
4 changed files with 14 additions and 1 deletions
|
@ -201,6 +201,16 @@ if (is_a_guest())
|
||||||
$user['username'] = l10n('guest');
|
$user['username'] = l10n('guest');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// in case an auth key was provided and is no longer valid, we must wait to
|
||||||
|
// be here, with language loaded, to prepare the message
|
||||||
|
if (isset($page['auth_key_invalid']) and $page['auth_key_invalid'])
|
||||||
|
{
|
||||||
|
$page['errors'][] =
|
||||||
|
l10n('Your authentication key is no longer valid.')
|
||||||
|
.sprintf(' <a href="%s">%s</a>', get_root_url().'identification.php', l10n('Login'))
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
// template instance
|
// template instance
|
||||||
if (defined('IN_ADMIN') and IN_ADMIN )
|
if (defined('IN_ADMIN') and IN_ADMIN )
|
||||||
{// Admin template
|
{// Admin template
|
||||||
|
|
|
@ -1506,6 +1506,7 @@ SELECT
|
||||||
// is the key still valid?
|
// is the key still valid?
|
||||||
if (strtotime($key['expired_on']) < strtotime($key['dbnow']))
|
if (strtotime($key['expired_on']) < strtotime($key['dbnow']))
|
||||||
{
|
{
|
||||||
|
$page['auth_key_invalid'] = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -425,4 +425,5 @@ $lang['Photo description'] = 'Photo description';
|
||||||
$lang['Album name, A → Z'] = 'Album name, A → Z';
|
$lang['Album name, A → Z'] = 'Album name, A → Z';
|
||||||
$lang['Album name, Z → A'] = 'Album name, Z → A';
|
$lang['Album name, Z → A'] = 'Album name, Z → A';
|
||||||
$lang['Link: %s'] = 'Link: %s';
|
$lang['Link: %s'] = 'Link: %s';
|
||||||
|
$lang['Your authentication key is no longer valid.'] = 'Your authentication key is no longer valid.';
|
||||||
?>
|
?>
|
|
@ -425,3 +425,4 @@ $lang['Photo description'] = 'Description de la photo';
|
||||||
$lang['Album name, A → Z'] = 'Nom de l\'album, A → Z';
|
$lang['Album name, A → Z'] = 'Nom de l\'album, A → Z';
|
||||||
$lang['Album name, Z → A'] = 'Nom de l\'album, Z → A';
|
$lang['Album name, Z → A'] = 'Nom de l\'album, Z → A';
|
||||||
$lang['Link: %s'] = 'Lien: %s';
|
$lang['Link: %s'] = 'Lien: %s';
|
||||||
|
$lang['Your authentication key is no longer valid.'] = 'Votre clef d\'identification n\'est plus valide.';
|
Loading…
Add table
Add a link
Reference in a new issue