Fix: broken features with multicompany

This commit is contained in:
Regis Houssin 2013-04-25 15:47:41 +02:00
parent 521929b740
commit 2f72bbca5a

View File

@ -141,6 +141,10 @@ if (! defined('NOREQUIREDB'))
{
$conf->entity = DOLENTITY;
}
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;