diff --git a/config/hosts.php b/config/hosts.php index f8b0afb..bf486d2 100644 --- a/config/hosts.php +++ b/config/hosts.php @@ -1,4 +1,10 @@ \ No newline at end of file diff --git a/vendor/zynapse/action_environment.php b/vendor/zynapse/action_environment.php index 6b905ba..5e63997 100644 --- a/vendor/zynapse/action_environment.php +++ b/vendor/zynapse/action_environment.php @@ -39,7 +39,7 @@ class ActionEnvironment { $env, $mode, $root, - + # paths $apps_path, $lib_path, @@ -53,6 +53,7 @@ class ActionEnvironment { $is_windows, $path_separator; + function __construct () { $this->set_include_paths(); $this->load_environment_file(); @@ -117,10 +118,10 @@ class ActionEnvironment { if ( is_array($list) && !empty($list) ) { $new_config = array(); foreach( $list as $host => $settings ) { - $regex = preg_quote($host, '/'); - $regex = str_replace('\*', '.*', $regex); - $http_host = (substr($_SERVER['HTTP_HOST'], 0, 4) == 'www.') ? substr($_SERVER['HTTP_HOST'], 4) : $_SERVER['HTTP_HOST'] ; - if ( preg_match('/^'.$regex.'$/i', $http_host) ) { + $regex = preg_quote($host, "/"); + $regex = str_replace("\*", ".*", $regex); + $http_host = (substr($_SERVER["HTTP_HOST"], 0, 4) == "www.") ? substr($_SERVER["HTTP_HOST"], 4) : $_SERVER["HTTP_HOST"] ; + if ( preg_match("/^".$regex."$/i", $http_host) ) { foreach( $settings as $key => $value ) { if ( !array_key_exists($key, $new_config) ) { $new_config[$key] = $value; @@ -132,7 +133,6 @@ class ActionEnvironment { return (!empty($new_config)) ? $new_config : false ; } - } ?> \ No newline at end of file diff --git a/vendor/zynapse/zynapse.php b/vendor/zynapse/zynapse.php index 2d3ecf4..94833a0 100644 --- a/vendor/zynapse/zynapse.php +++ b/vendor/zynapse/zynapse.php @@ -40,8 +40,8 @@ class Zynapse { $locale, // ActionLocale $log; // ActionLog + function init () { - require_once(ZNAP_LIB_ROOT . "/action_environment.php"); require_once(ZNAP_LIB_ROOT . "/action_base.php"); require_once(ZNAP_LIB_ROOT . "/active_session.php");