Fix: rename constants for multicompany cookie
This commit is contained in:
parent
cb286a2449
commit
395ea68b70
@ -567,7 +567,7 @@ if (! defined('NOLOGIN'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create entity cookie, just used for login page
|
// Create entity cookie, just used for login page
|
||||||
if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY) && !empty($conf->global->MAIN_MULTICOMPANY_COOKIE) && isset($_POST["entity"]))
|
if (! empty($conf->multicompany->enabled) && ! empty($conf->global->MULTICOMPANY_COOKIE_ENABLED) && isset($_POST["entity"]))
|
||||||
{
|
{
|
||||||
include_once(DOL_DOCUMENT_ROOT."/core/class/cookie.class.php");
|
include_once(DOL_DOCUMENT_ROOT."/core/class/cookie.class.php");
|
||||||
|
|
||||||
@ -576,7 +576,7 @@ if (! defined('NOLOGIN'))
|
|||||||
$prefix=dol_getprefix();
|
$prefix=dol_getprefix();
|
||||||
$entityCookieName = 'DOLENTITYID_'.$prefix;
|
$entityCookieName = 'DOLENTITYID_'.$prefix;
|
||||||
// TTL : is defined in the config page multicompany
|
// TTL : is defined in the config page multicompany
|
||||||
$ttl = (! empty($conf->global->MAIN_MULTICOMPANY_COOKIE_TTL) ? $conf->global->MAIN_MULTICOMPANY_COOKIE_TTL : time()+60*60*8 );
|
$ttl = (! empty($conf->global->MULTICOMPANY_COOKIE_TTL) ? $conf->global->MULTICOMPANY_COOKIE_TTL : time()+60*60*8 );
|
||||||
// Cryptkey : will be created randomly in the config page multicompany
|
// Cryptkey : will be created randomly in the config page multicompany
|
||||||
$cryptkey = (! empty($conf->file->cookie_cryptkey) ? $conf->file->cookie_cryptkey : '' );
|
$cryptkey = (! empty($conf->file->cookie_cryptkey) ? $conf->file->cookie_cryptkey : '' );
|
||||||
|
|
||||||
|
|||||||
@ -137,7 +137,7 @@ if (! defined('NOREQUIREDB'))
|
|||||||
{
|
{
|
||||||
$conf->entity = GETPOST("entity",'int');
|
$conf->entity = GETPOST("entity",'int');
|
||||||
}
|
}
|
||||||
else // TODO Does this "else" still usefull ?
|
else
|
||||||
{
|
{
|
||||||
$prefix=dol_getprefix();
|
$prefix=dol_getprefix();
|
||||||
$entityCookieName = 'DOLENTITYID_'.$prefix;
|
$entityCookieName = 'DOLENTITYID_'.$prefix;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user