From 395ea68b703cfe418593a7588c95851fc75e0093 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 11 Jan 2012 06:28:05 +0800 Subject: [PATCH] Fix: rename constants for multicompany cookie --- htdocs/main.inc.php | 4 ++-- htdocs/master.inc.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 04c8fa9ca6b..3bf545422ec 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -567,7 +567,7 @@ if (! defined('NOLOGIN')) } // 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"); @@ -576,7 +576,7 @@ if (! defined('NOLOGIN')) $prefix=dol_getprefix(); $entityCookieName = 'DOLENTITYID_'.$prefix; // 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 = (! empty($conf->file->cookie_cryptkey) ? $conf->file->cookie_cryptkey : '' ); diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index b36d3316cb0..2e351983167 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -137,7 +137,7 @@ if (! defined('NOREQUIREDB')) { $conf->entity = GETPOST("entity",'int'); } - else // TODO Does this "else" still usefull ? + else { $prefix=dol_getprefix(); $entityCookieName = 'DOLENTITYID_'.$prefix;