simple check and error-message, if cookies are not enabled, also changed famous "Your session could not be verified" to more understandable "Your session timed out, please log in again"

This commit is contained in:
Ralf Becker 2014-09-10 08:27:13 +00:00
parent 06a78f145f
commit 1cdc989f18
3 changed files with 18 additions and 11 deletions

View File

@ -150,18 +150,18 @@ else
case 2:
return lang('Sorry, your login has expired');
case 4:
return lang('Cookies are required to login to this site.');
return lang('Cookies are required to login to this site');
case 5:
return '<font color="red">' . lang('Bad login or password') . '</font>';
return lang('Bad login or password');
case 98:
return '<font color="red">' . lang('Account is expired') . '</font>';
return lang('Account is expired');
case 99:
return '<font color="red">' . lang('Blocked, too many attempts') . '</font>';
return lang('Blocked, too many attempts');
case 10:
$GLOBALS['egw']->session->egw_setcookie('sessionid');
$GLOBALS['egw']->session->egw_setcookie('kp3');
$GLOBALS['egw']->session->egw_setcookie('domain');
return '<font color="red">' . lang('Your session could not be verified.') . '</font>';
return lang('Your session timed out, please log in again');
default:
if (!$code)
{
@ -252,10 +252,10 @@ else
$GLOBALS['egw']->session->egw_setcookie('eGW_remember','',0,'/');
egw::redirect_link('/login.php','cd=5');
}
#if(!isset($_COOKIE['eGroupWareLoginTime']))
#{
# $GLOBALS['egw']->redirect($GLOBALS['egw']->link('/login.php','cd=4'));
#}
if ($_COOKIE['eGW_cookie_test'] !== 'enabled')
{
egw::redirect_link('/login.php','cd=4');
}
// don't get login data again when $submit is true
if($submit == false)
@ -409,6 +409,10 @@ else
}
$GLOBALS['egw_info']['user']['preferences']['common']['lang'] = $lang;
}
if ($_COOKIE['eGW_cookie_test'] !== 'enabled')
{
egw_session::egw_setcookie('eGW_cookie_test','enabled',0);
}
#print 'LANG:' . $GLOBALS['egw_info']['user']['preferences']['common']['lang'] . '<br>';
translation::init(); // this will set the language according to the (new) set prefs
translation::add_app('login');

View File

@ -194,6 +194,7 @@ congo, the democratic republic of the common de KONGO, DIE DEMOKRATISCHE REPUBLI
contacting server... common de Kontaktiere Server...
content type common de Content Typ
cook islands common de COOK INSELN
cookies are required to login to this site login de Cookies werden benötigt um sich hier anzumelden
copy common de Kopieren
costa rica common de COSTA RICA
cote d ivoire common de COTE D IVOIRE
@ -914,7 +915,7 @@ your password is about to expire in %1 days, you may change your password now co
your password might not match the password policy. common de Ihr Passwort könnte den Richtlinien nicht entsprechen.
your search returned %1 matchs common de Ihre Suche ergab %1 Treffer
your search returned 1 match common de Ihre Suche ergab einen Treffer
your session could not be verified. login de Ihre Sitzung konnte nicht verifiziert werden.
your session timed out, please log in again login de Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an
your settings have been updated common de Ihre Einstellungen wurden aktualisiert
zambia common de ZAMBIA
zimbabwe common de ZIMBABWE

View File

@ -194,6 +194,7 @@ congo, the democratic republic of the common en CONGO, THE DEMOCRATIC REPUBLIC O
contacting server... common en Contacting server...
content type common en Content type
cook islands common en COOK ISLANDS
cookies are required to login to this site login en Cookies are required to login to this site
copy common en Copy
costa rica common en COSTA RICA
cote d ivoire common en COTE D IVOIRE
@ -790,6 +791,7 @@ text color: common en Text color:
thailand common en THAILAND
the api is current common en The API is current
the api requires an upgrade common en The API requires an upgrade
the browser popup blocker is on. please click on ok button to see the pop-up.\n\nif you would like to not see this message for the next time, allow your browser pop-up blocker to open popups from %1 common en The browser popup blocker is on. Please click on ok button to see the pop-up.\n\nIf you would like to not see this message for the next time, allow your browser pop-up blocker to open popups from %1
the following applications require upgrades common en The following applications require upgrades
the mail server returned common en The mail server returned
there already is a system-user with this name. user's should not have the same name as a systemuser common en There already is a system user with this name. Please, select another name.
@ -913,7 +915,7 @@ your password is about to expire in %1 days, you may change your password now co
your password might not match the password policy. common en Your password might not match the password policy.
your search returned %1 matchs common en Search returned %1 matches
your search returned 1 match common en Search returned 1 match
your session could not be verified. login en Your session could not be verified.
your session timed out, please log in again login en Your session timed out, please log in again
your settings have been updated common en Your settings have been updated.
zambia common en ZAMBIA
zimbabwe common en ZIMBABWE