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: Project PDF document show the tasks.
|
||||
- Fix: bug #29278 : SMTP fails with IP
|
||||
- Fix: Default language on login page.
|
||||
|
||||
For developers:
|
||||
- More comments in code.
|
||||
|
||||
@ -35,7 +35,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
||||
{
|
||||
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->load("main");
|
||||
@ -44,7 +44,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
||||
|
||||
$main_authentication=$conf->file->main_authentication;
|
||||
$session_name=session_name();
|
||||
|
||||
|
||||
$dol_url_root = DOL_URL_ROOT;
|
||||
|
||||
$php_self = $_SERVER['PHP_SELF'];
|
||||
@ -204,9 +204,9 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
||||
}
|
||||
}
|
||||
$main_home=nl2br($conf->global->MAIN_HOME);
|
||||
|
||||
|
||||
$dol_loginmesg = $_SESSION["dol_loginmesg"];
|
||||
|
||||
|
||||
include($template_dir.'login.tpl.php'); // To use native PHP
|
||||
|
||||
$_SESSION["dol_loginmesg"] = '';
|
||||
|
||||
@ -338,7 +338,7 @@ if (! defined('NOLOGIN'))
|
||||
|
||||
// Validation tests user / password
|
||||
// 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;
|
||||
if (isset($_SERVER["REMOTE_USER"]) && in_array('http',$authmode)) $goontestloop=true;
|
||||
if (isset($_POST["username"])) $goontestloop=true;
|
||||
@ -438,8 +438,7 @@ if (! defined('NOLOGIN'))
|
||||
}
|
||||
else
|
||||
{
|
||||
// It is already in a backup session login
|
||||
// Remarks: We do not save user object poses for bp in some cases misidentified
|
||||
// It is already in a session
|
||||
$login=$_SESSION["dol_login"];
|
||||
$resultFetchUser=$user->fetch($login);
|
||||
dol_syslog("This is an already logged session. _SESSION['dol_login']=".$login);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user