2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Frédéric FRANCE
2018-05-23 17:16:58 +02:00
parent f58e0d3bcf
commit 1b69c2357f
12 changed files with 12 additions and 12 deletions

View File

@@ -44,7 +44,7 @@ define('EVEN_IF_ONLY_LOGIN_ALLOWED',1); // Set this define to 0 if you want to
// Load Dolibarr environment
$res=0;
// Try master.inc.php into web root detected using web root caluclated from SCRIPT_FILENAME
// Try master.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
$tmp=empty($_SERVER['SCRIPT_FILENAME'])?'':$_SERVER['SCRIPT_FILENAME'];$tmp2=realpath(__FILE__); $i=strlen($tmp)-1; $j=strlen($tmp2)-1;
while($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i]==$tmp2[$j]) { $i--; $j--; }
if (! $res && $i > 0 && file_exists(substr($tmp, 0, ($i+1))."/master.inc.php")) $res=@include(substr($tmp, 0, ($i+1))."/master.inc.php");