From ad39aa9b70e419429839bd4e3a8bf29b9577b2ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Dec 2010 02:12:39 +0000 Subject: [PATCH] Can retreive main global variables --- htdocs/lib/functions.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 52cd5a7ffac..2120c81f418 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -91,7 +91,8 @@ function dol_getprefix() */ function dol_include_once($relpath) { - return include_once(dol_buildpath($relpath)); + global $conf,$langs,$user,$mysoc; // Other global var must be retreived with $GLOBALS['var'] + return include_once(dol_buildpath($relpath)); } /** @@ -101,7 +102,8 @@ function dol_include_once($relpath) */ function dol_require_once($relpath) { - return require_once(dol_buildpath($relpath)); + global $conf,$langs,$user,$mysoc; // Other global var must be retreived with $GLOBALS['var'] + return require_once(dol_buildpath($relpath)); } /**