mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-11 12:01:23 +01:00
Fix: bad sessiontimeout name
This commit is contained in:
@@ -79,8 +79,12 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
|||||||
$conf->css = "/theme/".$conf->theme."/style.css.php?lang=".$langs->defaultlang;
|
$conf->css = "/theme/".$conf->theme."/style.css.php?lang=".$langs->defaultlang;
|
||||||
$conf_css = DOL_URL_ROOT.$conf->css;
|
$conf_css = DOL_URL_ROOT.$conf->css;
|
||||||
|
|
||||||
|
// Add real path in session name
|
||||||
|
$realpath='';
|
||||||
|
if ( preg_match('/^([^.]+)\/htdocs\//i', realpath($_SERVER["SCRIPT_FILENAME"]), $regs)) $realpath = isset($regs[1])?$regs[1]:'';
|
||||||
|
|
||||||
// Set cookie for timeout management
|
// Set cookie for timeout management
|
||||||
$sessiontimeout='DOLSESSTIMEOUT_'.md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"]);
|
$sessiontimeout='DOLSESSTIMEOUT_'.md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].$realpath);
|
||||||
if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) setcookie($sessiontimeout, $conf->global->MAIN_SESSION_TIMEOUT, 0, "/", '', 0);
|
if (! empty($conf->global->MAIN_SESSION_TIMEOUT)) setcookie($sessiontimeout, $conf->global->MAIN_SESSION_TIMEOUT, 0, "/", '', 0);
|
||||||
|
|
||||||
if (! empty($_REQUEST["urlfrom"])) $_SESSION["urlfrom"]=$_REQUEST["urlfrom"];
|
if (! empty($_REQUEST["urlfrom"])) $_SESSION["urlfrom"]=$_REQUEST["urlfrom"];
|
||||||
|
|||||||
Reference in New Issue
Block a user