mirror of
https://github.com/jimeh/zynapse.git
synced 2026-02-19 07:06:39 +00:00
Added some comments and whitespaces, yes, I added whitespace characters in a few places.
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
<?php
|
||||
/*
|
||||
|
||||
Hosts
|
||||
- configure host specific environment settings
|
||||
|
||||
*/
|
||||
|
||||
# host configuration
|
||||
# - set environment, display mode, and root path for
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<?php
|
||||
/*
|
||||
|
||||
Routes
|
||||
- configure url parsing routes
|
||||
|
||||
*/
|
||||
|
||||
|
||||
?>
|
||||
12
vendor/zynapse/action_environment.php
vendored
12
vendor/zynapse/action_environment.php
vendored
@@ -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 ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
2
vendor/zynapse/zynapse.php
vendored
2
vendor/zynapse/zynapse.php
vendored
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user