Fix: broken features with multicompany

This commit is contained in:
Regis Houssin 2013-04-25 15:49:27 +02:00
parent edc84f4168
commit ce3b8e5cc8

View File

@ -143,7 +143,10 @@ if (! defined('NOREQUIREDB'))
{
$conf->entity = DOLENTITY;
}
// TODO Multicompany Remove this.
else if (!empty($_COOKIE['DOLENTITY'])) // For other application with MultiCompany module
{
$conf->entity = $_COOKIE['DOLENTITY'];
}
else if (! empty($conf->multicompany->force_entity) && is_int($conf->multicompany->force_entity)) // To force entity in login page
{
$conf->entity = $conf->multicompany->force_entity;