Fix: Default language on login page
This commit is contained in:
parent
9df4f1ad7e
commit
b33b1c56b8
@ -26,6 +26,7 @@ For users:
|
|||||||
- Fix: Can change password if has only permission change password.
|
- Fix: Can change password if has only permission change password.
|
||||||
- Fix: Project PDF document show the tasks.
|
- Fix: Project PDF document show the tasks.
|
||||||
- Fix: bug #29278 : SMTP fails with IP
|
- Fix: bug #29278 : SMTP fails with IP
|
||||||
|
- Fix: Default language on login page.
|
||||||
|
|
||||||
For developers:
|
For developers:
|
||||||
- More comments in code.
|
- More comments in code.
|
||||||
|
|||||||
@ -35,7 +35,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
|||||||
{
|
{
|
||||||
global $dolibarr_main_demo,$db;
|
global $dolibarr_main_demo,$db;
|
||||||
|
|
||||||
$langcode=(empty($_GET["lang"])?'auto':$_GET["lang"]);
|
$langcode=(empty($_GET["lang"])?((is_object($langs)&&$langs->defaultlang)?$langs->defaultlang:'auto'):$_GET["lang"]);
|
||||||
$langs->setDefaultLang($langcode);
|
$langs->setDefaultLang($langcode);
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
|
|||||||
@ -338,7 +338,7 @@ if (! defined('NOLOGIN'))
|
|||||||
|
|
||||||
// Validation tests user / password
|
// Validation tests user / password
|
||||||
// If ok, the variable will be initialized login
|
// If ok, the variable will be initialized login
|
||||||
// If error, we will put error message in session under the name dol_loginmesg $goontestloop=false;
|
// If error, we will put error message in session under the name dol_loginmesg
|
||||||
$goontestloop=false;
|
$goontestloop=false;
|
||||||
if (isset($_SERVER["REMOTE_USER"]) && in_array('http',$authmode)) $goontestloop=true;
|
if (isset($_SERVER["REMOTE_USER"]) && in_array('http',$authmode)) $goontestloop=true;
|
||||||
if (isset($_POST["username"])) $goontestloop=true;
|
if (isset($_POST["username"])) $goontestloop=true;
|
||||||
@ -438,8 +438,7 @@ if (! defined('NOLOGIN'))
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// It is already in a backup session login
|
// It is already in a session
|
||||||
// Remarks: We do not save user object poses for bp in some cases misidentified
|
|
||||||
$login=$_SESSION["dol_login"];
|
$login=$_SESSION["dol_login"];
|
||||||
$resultFetchUser=$user->fetch($login);
|
$resultFetchUser=$user->fetch($login);
|
||||||
dol_syslog("This is an already logged session. _SESSION['dol_login']=".$login);
|
dol_syslog("This is an already logged session. _SESSION['dol_login']=".$login);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user