From 0ea2a52fe228fd482f4cb4ce9440c22b8c37d9da Mon Sep 17 00:00:00 2001
From: nveid <nveid@ispconfig3>
Date: Mon, 29 Aug 2011 06:29:57 -0400
Subject: [PATCH] Reference: http://www.howtoforge.com/forums/showthread.php?t=53938
---
install/tpl/config.inc.php.master | 1 +
server/server.php | 8 +++++---
server/lib/app.inc.php | 4 ++--
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master
index 97b94fe..8370270 100644
--- a/install/tpl/config.inc.php.master
+++ b/install/tpl/config.inc.php.master
@@ -57,6 +57,7 @@
//** 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 fc2397c..a1d765d 100644
--- a/server/lib/app.inc.php
+++ b/server/lib/app.inc.php
@@ -75,7 +75,7 @@
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 @@
$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 c171d48..967d13a 100644
--- a/server/server.php
+++ b/server/server.php
@@ -1,5 +1,4 @@
<?php
-
/*
Copyright (c) 2007-2011, Till Brehm, projektfarm Gmbh
All rights reserved.
@@ -28,8 +27,11 @@
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-require('lib/config.inc.php');
-require('lib/app.inc.php');
+// $script_path allows development work of using a symbolic link farm
+// to use along side git or svn
+$script_path = dirname($_SERVER["SCRIPT_FILENAME"]);
+require("$script_path/lib/config.inc.php");
+require("$script_path/lib/app.inc.php");
set_time_limit(0);
ini_set('error_reporting', E_ALL & ~E_NOTICE);
--
Gitblit v1.9.1