From b8fd6bb74c180a3667b2c52b364a0303a5672e9f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Apr 2009 18:38:15 +0000 Subject: [PATCH] Fix: Correct pb of warnings during install that appeared on some config due to multicompany changes. --- htdocs/master.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 7684322ee70..7db5e02d5d0 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -204,8 +204,12 @@ if (! defined('NOREQUIREUSER')) */ if (! defined('NOREQUIREDB')) { + // TODO Should remove this to not define entity here but later once value of entity has been read from + // session in main.inc.php. + // master.inc.php (used also by scripts) should be safe of any command that depends on screen code. $entityCookieName = "DOLENTITYID_dolibarr"; - $entity = $_COOKIE[$entityCookieName]?$_COOKIE[$entityCookieName]:1; + $entity = 1; // By default; + if (isset($_COOKIE[$entityCookieName])) $entity=$_COOKIE[$entityCookieName]?$_COOKIE[$entityCookieName]:1; $conf->setValues($db,$entity); }