From d71477327901b48d9ad55148ce2a9d83ad02b4ce Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Thu, 16 May 2013 21:42:55 +0000 Subject: [PATCH] task #843 : include_path automatique --- include/constant.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/constant.php b/include/constant.php index a2a024b30..4760bceda 100644 --- a/include/constant.php +++ b/include/constant.php @@ -27,6 +27,18 @@ require_once ('config.inc.php'); require_once('constant.security.php'); // SVNVERSION global $version_phpcompta; +/* + * Include path + */ +$inc_path=get_include_path(); +$dirname=dirname(__FILE__); +if ( strpos($inc_path,";") != 0 ) { + $new_path=$inc_path.';'.$dirname; + $os=0; /* $os is 0 for windoz */ +} else { + $new_path=$inc_path.':'.$dirname; + $os=1; /* $os is 1 for unix */ +} global $g_captcha,$g_failed,$g_succeed;