Fix regression in unit tests

This commit is contained in:
Laurent Destailleur 2017-09-16 03:54:23 +02:00
parent 961d475a9d
commit a6b600c8a1

View File

@ -37,9 +37,9 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not lo
if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session)
$DOLAPIENTITY = $_SERVER['HTTP_DOLAPIENTITY'];
$entity=(! empty($DOLAPIENTITY) ? (int) $DOLAPIENTITY : (! empty($DOLAPIENTITY) ? (int) $DOLAPIENTITY : 1));
if (is_numeric($entity)) define("DOLENTITY", $entity);
// Force entity if a value provided int HTTP header. Otherwise, will use the entity of user of token used.
if (! empty($_SERVER['HTTP_DOLAPIENTITY'])) define("DOLENTITY", (int) $_SERVER['HTTP_DOLAPIENTITY']);
$res=0;
if (! $res && file_exists("../main.inc.php")) $res=include '../main.inc.php';