mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 16:35:38 +00:00
propperly evaluate lang from REQUEST
This commit is contained in:
parent
43c15ff399
commit
0f38a3dff6
|
@ -151,11 +151,9 @@ class SeedDMS_Controller_Login extends SeedDMS_Controller_Common {
|
|||
$user->clearLoginFailures();
|
||||
|
||||
// Capture the user's language and theme settings.
|
||||
if (isset($_REQUEST["lang"]) && strlen($_REQUEST["lang"])>0 && is_numeric(array_search($_REQUEST["lang"],getLanguages())) ) {
|
||||
$lang = $_REQUEST["lang"];
|
||||
if ($lang) {
|
||||
$user->setLanguage($lang);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$lang = $user->getLanguage();
|
||||
if (strlen($lang)==0) {
|
||||
$lang = $settings->_language;
|
||||
|
|
|
@ -65,6 +65,11 @@ if(isset($_POST['pwd'])) {
|
|||
}
|
||||
}
|
||||
|
||||
$lang = '';
|
||||
if(isset($_REQUEST["lang"]) && strlen($_REQUEST["lang"])>0 && is_numeric(array_search($_REQUEST["lang"],getLanguages())) ) {
|
||||
$lang = (string) $_REQUEST["lang"];
|
||||
}
|
||||
|
||||
$session = new SeedDMS_Session($db);
|
||||
|
||||
// TODO: by the PHP manual: The superglobals $_GET and $_REQUEST are already decoded.
|
||||
|
|
Loading…
Reference in New Issue
Block a user