Commit 0ea2a52f authored by nveid's avatar nveid
Browse files

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.
parent e615265d
......@@ -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
......
......@@ -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');
......
<?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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment