nveid
2011-08-29 0ea2a52fe228fd482f4cb4ce9440c22b8c37d9da
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.
3 files modified
13 ■■■■■ changed files
install/tpl/config.inc.php.master 1 ●●●● patch | view | raw | blame | history
server/lib/app.inc.php 4 ●●●● patch | view | raw | blame | history
server/server.php 8 ●●●●● patch | view | raw | blame | history
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
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');
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);