Merge pull request #3546 from GPCsolutions/badincludepath

Fix Do not always append htdocs to include path
This commit is contained in:
Laurent Destailleur 2015-10-04 20:14:13 +02:00
commit b5ec3b7085

View File

@ -163,7 +163,10 @@ if (! defined('NOSCANPOSTFORINJECTION'))
}
// This is to make Dolibarr working with Plesk
if (! empty($_SERVER['DOCUMENT_ROOT'])) set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
if (! empty($_SERVER['DOCUMENT_ROOT']) && substr($_SERVER['DOCUMENT_ROOT'], -6) !== 'htdocs') {
set_include_path($_SERVER['DOCUMENT_ROOT'] . '/htdocs');
}
}
// Include the conf.php and functions.lib.php
require_once 'filefunc.inc.php';