From 1a2bb672ae8629a84076196fe37e13e5e213b0f0 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Tue, 23 Nov 2004 11:10:41 +0000 Subject: [PATCH] be smart and autodetect root -- it can still be ovverriden if needed -- :) --- include/xorg.globals.inc.php.in | 13 +++++++++---- include/xorg.globals/.cvsignore | 0 install.d/platal.conf | 1 - 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 include/xorg.globals/.cvsignore diff --git a/include/xorg.globals.inc.php.in b/include/xorg.globals.inc.php.in index 432f4d6..cc0d63b 100644 --- a/include/xorg.globals.inc.php.in +++ b/include/xorg.globals.inc.php.in @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: xorg.globals.inc.php.in,v 1.4 2004-11-22 21:40:47 x2000habouzit Exp $ + $Id: xorg.globals.inc.php.in,v 1.5 2004-11-23 11:10:41 x2000habouzit Exp $ ***************************************************************************/ require_once("diogenes.core.globals.inc.php"); @@ -53,16 +53,21 @@ class XorgGlobals extends DiogenesCoreGlobals /** paths */ var $baseurl = "http://localhost/xorg"; - var $root = "/usr/share/xorg"; var $spoolroot = "/var/spool/xorg"; + var $root = null; /** recherche */ var $public_max_search_results = 25; var $search_results_per_page = 20; function XorgGlobals() { - $ini = dirname(dirname(__FILE__)).'/configs/platal.conf'; - $array = parse_ini_file($ini, true); + $this->root = dirname(dirname(__FILE__)); + + foreach(glob($this->root.'/include/xorg.globals/*.inc.php') as $inc) { + require_once($inc); + } + + $array = parse_ini_file($this->root.'/configs/platal.conf', true); if (!is_array($array)) { return; } diff --git a/include/xorg.globals/.cvsignore b/include/xorg.globals/.cvsignore new file mode 100644 index 0000000..e69de29 diff --git a/install.d/platal.conf b/install.d/platal.conf index 5e8f067..d7bc298 100644 --- a/install.d/platal.conf +++ b/install.d/platal.conf @@ -8,7 +8,6 @@ dbpwd = "***" ; base url of the site, WITHOUT LEADING / baseurl = "http://dev.m4x.org/~x2000habouzit"; -root = "/home/x2000habouzit/dev/public/"; spoolroot = "/home/x2000habouzit/dev/public/"; econfiance = "***"; -- 2.1.4