From 38dd3a82316feea43b590c4e667f21388fe270d6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Jan 2011 13:24:29 +0000 Subject: [PATCH] Some fix to work with 3.0 --- dev/skeletons/skeleton_page.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index 3fd7a5eec98..afb28c9080e 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -38,7 +38,13 @@ //if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session) // Change this following line to use the correct relative path (../, ../../, etc) -require("../main.inc.php"); +$res=0; +if (! $res && file_exists("../main.inc.php")) $res=@include("../main.inc.php"); +if (! $res && file_exists("../../main.inc.php")) $res=@include("../../main.inc.php"); +if (! $res && file_exists("../../../dolibarr/htdocs/main.inc.php")) $res=@include("../../../dolibarr/htdocs/main.inc.php"); // Used on dev env only +if (! $res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) $res=@include("../../../../dolibarr/htdocs/main.inc.php"); // Used on dev env only +if (! $res && file_exists("../../../../../dolibarr/htdocs/main.inc.php")) $res=@include("../../../../../dolibarr/htdocs/main.inc.php"); // Used on dev env only +if (! $res) die("Include of main fails"); // Change this following line to use the correct relative path from htdocs (do not remove DOL_DOCUMENT_ROOT) require_once(DOL_DOCUMENT_ROOT."/skeleton/skeleton_class.class.php");