From 908e408750584797f94091671254664981eeadf9 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 23 Apr 2009 13:39:39 +0000 Subject: [PATCH] Fix: create session and cookie for multi-company --- htdocs/main.inc.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index bcc0d380c29..7b573002daf 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -115,11 +115,7 @@ set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); // Retrieve the entity if (isset($_POST["entity"])) $_SESSION["dol_entity"] = $_POST["entity"]; $entityCookieName = "DOLENTITYID_dolibarr"; -if (isset($_COOKIE[$entityCookieName])) -{ - $conf->entity = $_COOKIE[$entityCookieName]; - $_SESSION["dol_entity"] = $conf->entity; -} +if (isset($_COOKIE[$entityCookieName])) $conf->entity = $_SESSION["dol_entity"] = $_COOKIE[$entityCookieName]; // Set and init common variables require_once("master.inc.php");