Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
merge r4955 from branch 2.0 to trunk
bug 1452 fixed: check cookies are enabled in web browser and notify user
otherwise that she can't connect.


git-svn-id: http://piwigo.org/svn/trunk@4956 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Feb 23, 2010
1 parent 570c905 commit 1492683
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
22 changes: 16 additions & 6 deletions identification.php
Expand Up @@ -45,15 +45,25 @@

if (isset($_POST['login']))
{
$redirect_to = isset($_POST['redirect']) ? $_POST['redirect'] : '';
$remember_me = isset($_POST['remember_me']) and $_POST['remember_me']==1;
if ( try_log_user($_POST['username'], $_POST['password'], $remember_me) )
if (!isset($_COOKIE[session_name()]))
{
redirect(empty($redirect_to) ? make_index_url() : $redirect_to);
array_push(
$errors,
l10n('Cookies are blocked or not supported by your browser. You must enable cookies to connect.')
);
}
else
{
array_push( $errors, l10n('invalid_pwd') );
{
$redirect_to = isset($_POST['redirect']) ? $_POST['redirect'] : '';
$remember_me = isset($_POST['remember_me']) and $_POST['remember_me']==1;
if ( try_log_user($_POST['username'], $_POST['password'], $remember_me) )
{
redirect(empty($redirect_to) ? make_index_url() : $redirect_to);
}
else
{
array_push( $errors, l10n('invalid_pwd') );
}
}
}

Expand Down
1 change: 1 addition & 0 deletions language/en_UK/common.lang.php
Expand Up @@ -369,4 +369,5 @@
// --------- Starting below: New or revised $lang ---- from Colibri (2.1)
$lang['del_all_favorites_hint'] = 'delete all images from your favorites';
$lang['Sent by'] = 'Sent by';
$lang['Cookies are blocked or not supported by your browser. You must enable cookies to connect.'] = 'Cookies are blocked or not supported by your browser. You must enable cookies to connect.';
?>
1 change: 1 addition & 0 deletions language/fr_FR/common.lang.php
Expand Up @@ -368,4 +368,5 @@
$lang['Reset_To_Default'] = 'Rétablir les valeurs par défaut';
$lang['del_all_favorites_hint'] = 'supprimer toutes les images de vos favoris';
$lang['Sent by'] = 'Envoyé par';
$lang['Cookies are blocked or not supported by your browser. You must enable cookies to connect.'] = 'Les cookies sont bloqués ou non supportés par votre navigateur web. Vous devez activer les cookies pour vous connecter.';
?>

0 comments on commit 1492683

Please sign in to comment.