From 0ea2a52fe228fd482f4cb4ce9440c22b8c37d9da Mon Sep 17 00:00:00 2001 From: nveid Date: Mon, 29 Aug 2011 10:29:57 +0000 Subject: [PATCH] Reference: http://www.howtoforge.com/forums/showthread.php?t=53938 1) Added DEVSYSTEM define in config.inc.php.master defaults to 0 If set to 1 classes can load as symbolc links, server.php now 2) server.php now resolves its require()ed files with an absolute path instead of relative. --- install/tpl/config.inc.php.master | 1 + server/lib/app.inc.php | 4 ++-- server/server.php | 8 +++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master index 97b94fedf..837027015 100644 --- a/install/tpl/config.inc.php.master +++ b/install/tpl/config.inc.php.master @@ -57,6 +57,7 @@ $revision = str_replace(array('Revision:','$',' '), '', $svn_revision); //** Application define('ISPC_APP_TITLE', 'ISPConfig'); define('ISPC_APP_VERSION', '3.0.3.3'); +define('DEVSYSTEM', 0); //** Database diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php index fc2397cbf..a1d765d5e 100644 --- a/server/lib/app.inc.php +++ b/server/lib/app.inc.php @@ -75,7 +75,7 @@ class app { if(is_array($cl)) { foreach($cl as $classname) { if(!@is_object($this->$classname)) { - if(is_file($conf['classpath'].'/'.$classname.'.inc.php') && !is_link($conf['classpath'].'/'.$classname.'.inc.php')) { + if(is_file($conf['classpath'].'/'.$classname.'.inc.php') && (DEVSYSTEM || !is_link($conf['classpath'].'/'.$classname.'.inc.php'))) { include_once($conf['classpath'].'/'.$classname.'.inc.php'); $this->$classname = new $classname; } @@ -91,7 +91,7 @@ class app { $cl = explode(',',$classes); if(is_array($cl)) { foreach($cl as $classname) { - if(is_file($conf['classpath'].'/'.$classname.'.inc.php') && !is_link($conf['classpath'].'/'.$classname.'.inc.php')) { + if(is_file($conf['classpath'].'/'.$classname.'.inc.php') && (DEVSYSTEM || !is_link($conf['classpath'].'/'.$classname.'.inc.php'))) { include_once($conf['classpath'].'/'.$classname.'.inc.php'); } else { die('Unable to load: '.$conf['classpath'].'/'.$classname.'.inc.php'); diff --git a/server/server.php b/server/server.php index c171d4848..967d13a61 100644 --- a/server/server.php +++ b/server/server.php @@ -1,5 +1,4 @@