From 710c9517f4adf2fdb5aa4bef8ffec5ef8f3b5f58 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 28 Aug 2013 16:39:23 +0200 Subject: [PATCH] Cleaner example --- dev/skeletons/skeleton_page.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index 9a0bbbd23c7..32c610aff96 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -37,12 +37,10 @@ // Change this following line to use the correct relative path (../, ../../, etc) $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("../../../main.inc.php")) $res=@include '../../../main.inc.php'; +if (! $res && file_exists("../main.inc.php")) $res=@include '../main.inc.php'; // to work if your module directory is into dolibarr root htdocs directory +if (! $res && file_exists("../../main.inc.php")) $res=@include '../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory 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 dol_include_once('/module/class/skeleton_class.class.php');