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
|
<?php
|
||||||
|
/*
|
||||||
|
|
||||||
|
Hosts
|
||||||
|
- configure host specific environment settings
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
# host configuration
|
# host configuration
|
||||||
# - set environment, display mode, and root path for
|
# - set environment, display mode, and root path for
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/*
|
||||||
|
|
||||||
|
Routes
|
||||||
|
- configure url parsing routes
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
10
vendor/zynapse/action_environment.php
vendored
10
vendor/zynapse/action_environment.php
vendored
@@ -53,6 +53,7 @@ class ActionEnvironment {
|
|||||||
$is_windows,
|
$is_windows,
|
||||||
$path_separator;
|
$path_separator;
|
||||||
|
|
||||||
|
|
||||||
function __construct () {
|
function __construct () {
|
||||||
$this->set_include_paths();
|
$this->set_include_paths();
|
||||||
$this->load_environment_file();
|
$this->load_environment_file();
|
||||||
@@ -117,10 +118,10 @@ class ActionEnvironment {
|
|||||||
if ( is_array($list) && !empty($list) ) {
|
if ( is_array($list) && !empty($list) ) {
|
||||||
$new_config = array();
|
$new_config = array();
|
||||||
foreach( $list as $host => $settings ) {
|
foreach( $list as $host => $settings ) {
|
||||||
$regex = preg_quote($host, '/');
|
$regex = preg_quote($host, "/");
|
||||||
$regex = str_replace('\*', '.*', $regex);
|
$regex = str_replace("\*", ".*", $regex);
|
||||||
$http_host = (substr($_SERVER['HTTP_HOST'], 0, 4) == 'www.') ? substr($_SERVER['HTTP_HOST'], 4) : $_SERVER['HTTP_HOST'] ;
|
$http_host = (substr($_SERVER["HTTP_HOST"], 0, 4) == "www.") ? substr($_SERVER["HTTP_HOST"], 4) : $_SERVER["HTTP_HOST"] ;
|
||||||
if ( preg_match('/^'.$regex.'$/i', $http_host) ) {
|
if ( preg_match("/^".$regex."$/i", $http_host) ) {
|
||||||
foreach( $settings as $key => $value ) {
|
foreach( $settings as $key => $value ) {
|
||||||
if ( !array_key_exists($key, $new_config) ) {
|
if ( !array_key_exists($key, $new_config) ) {
|
||||||
$new_config[$key] = $value;
|
$new_config[$key] = $value;
|
||||||
@@ -132,7 +133,6 @@ class ActionEnvironment {
|
|||||||
return (!empty($new_config)) ? $new_config : false ;
|
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
|
$locale, // ActionLocale
|
||||||
$log; // ActionLog
|
$log; // ActionLog
|
||||||
|
|
||||||
function init () {
|
|
||||||
|
|
||||||
|
function init () {
|
||||||
require_once(ZNAP_LIB_ROOT . "/action_environment.php");
|
require_once(ZNAP_LIB_ROOT . "/action_environment.php");
|
||||||
require_once(ZNAP_LIB_ROOT . "/action_base.php");
|
require_once(ZNAP_LIB_ROOT . "/action_base.php");
|
||||||
require_once(ZNAP_LIB_ROOT . "/active_session.php");
|
require_once(ZNAP_LIB_ROOT . "/active_session.php");
|
||||||
|
|||||||
Reference in New Issue
Block a user