Fix: rename constants for multicompany cookie

This commit is contained in:
Regis Houssin 2012-01-11 06:28:05 +08:00
parent cb286a2449
commit 395ea68b70
2 changed files with 3 additions and 3 deletions

View File

@ -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 : '' );

View File

@ -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;