2
0
forked from Wavyzz/dolibarr

Fix template

This commit is contained in:
Laurent Destailleur
2017-07-14 03:09:58 +02:00
parent 15cf15f47f
commit ccd20d979f

View File

@@ -43,7 +43,11 @@ $error=0;
define('EVEN_IF_ONLY_LOGIN_ALLOWED',1); // Set this define to 0 if you want to lock your script when dolibarr setup is "locked to admin user only".
// Include and load Dolibarr environment variables
require_once($path."../../htdocs/master.inc.php");
if (! $res && file_exists($path."master.inc.php")) $res=@include($path."master.inc.php");
if (! $res && file_exists($path."../master.inc.php")) $res=@include($path."../master.inc.php");
if (! $res && file_exists($path."../../master.inc.php")) $res=@include($path."../../master.inc.php");
if (! $res && file_exists($path."../../../master.inc.php")) $res=@include($path."../../../master.inc.php");
if (! $res) die("Include of master fails");
// After this $db, $mysoc, $langs, $conf and $hookmanager are defined (Opened $db handler to database will be closed at end of file).
// $user is created but empty.