Some cleanup, and code style changes.

This commit is contained in:
2009-08-17 14:33:23 +03:00
parent 776a0ca8a1
commit b3c17af11c
6 changed files with 38 additions and 41 deletions

View File

@@ -75,13 +75,13 @@ class ActionBase {
}
function set_paths () {
$this->apps_path = ZNAP_ROOT . "/apps";
$this->lib_path = ZNAP_ROOT . "/lib";
$this->log_path = ZNAP_ROOT . "/log";
$this->public_path = ZNAP_ROOT . "/public";
$this->tmp_path = ZNAP_ROOT . "/tmp";
$this->cache_path = $this->tmp_path . "/cache";
$this->script_path = ZNAP_ROOT . "/script";
$this->apps_path = ZNAP_ROOT."/apps";
$this->lib_path = ZNAP_ROOT."/lib";
$this->log_path = ZNAP_ROOT."/log";
$this->public_path = ZNAP_ROOT."/public";
$this->tmp_path = ZNAP_ROOT."/tmp";
$this->cache_path = $this->tmp_path."/cache";
$this->script_path = ZNAP_ROOT."/script";
}
}

View File

@@ -59,7 +59,7 @@ class ActionEnvironment {
}
function load_environment_file () {
require_once(ZNAP_CONFIG . "/environment.php");
require_once(ZNAP_CONFIG."/environment.php");
if ( !empty($enable_host_specific_configuration) ) {
$this->load_hosts_file();
}
@@ -71,7 +71,7 @@ class ActionEnvironment {
}
function load_hosts_file () {
require_once(ZNAP_CONFIG . "/hosts.php");
require_once(ZNAP_CONFIG."/hosts.php");
$host = $this->match_to_host($hosts);
if ( !empty($host) ) {
if ( !empty($host['environment']) ) $this->environment = $host['environment'];
@@ -84,7 +84,7 @@ class ActionEnvironment {
}
function load_environment_specific_file () {
require_once(ZNAP_CONFIG . "/environments/". $this->environment . ".php");
require_once(ZNAP_CONFIG."/environments/".$this->environment.".php");
}
function set_include_paths () {
@@ -96,9 +96,9 @@ class ActionEnvironment {
$this->path_seperator = ";";
}
ini_set("include_path",
'.' . $this->path_seperator .
ZNAP_LIB_ROOT . $this->path_seperator .
ZNAP_LIB_ROOT . "/script" . $this->path_seperator .
'.'.$this->path_seperator.
ZNAP_LIB_ROOT.$this->path_seperator.
ZNAP_LIB_ROOT."/script".$this->path_seperator.
ini_get('include_path')
);
}

View File

@@ -44,10 +44,10 @@ class Zynapse {
function init () {
require_once(ZNAP_LIB_ROOT . "/action_environment.php");
require_once(ZNAP_LIB_ROOT . "/action_base.php");
require_once(ZNAP_LIB_ROOT . "/action_view.php");
require_once(ZNAP_LIB_ROOT . "/active_session.php");
require_once(ZNAP_LIB_ROOT."/action_environment.php");
require_once(ZNAP_LIB_ROOT."/action_base.php");
require_once(ZNAP_LIB_ROOT."/action_view.php");
require_once(ZNAP_LIB_ROOT."/active_session.php");
$start = microtime(true);
@@ -55,12 +55,9 @@ class Zynapse {
self::init_base();
self::init_view();
echo microtime(true) - $start . "<br />\n";
echo microtime(true) - $start."<br />\n";
echo "hello world<br />\n";
echo self::$env->environment . "<br />\n<br />\n";
// echo serialize(self::$env) . "<br />\n<br />\n";
// echo serialize(self::$base) . "<br />\n<br />\n";
echo self::$env->environment."<br />\n<br />\n";
}
function init_env () {