Changed environment checking to use HTTP_HOST instead of SERVER_NAME to resolve an issue with nginx server_name variable. Updated jarring to skip any files prefixed with '.' so that I could edit core files and not generate munged jar files because of vi .swp files.

This commit is contained in:
Josh Sherman 2011-08-06 12:57:59 -04:00
parent 3ea9ec8f36
commit dbcf6fdb80
3 changed files with 7 additions and 1204 deletions

View file

@ -131,7 +131,9 @@ class Config extends Object
}
else
{
if ((preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $host) && $_SERVER['SERVER_ADDR'] == $host) || $_SERVER['SERVER_NAME'] == $host)
if ((preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $host)
&& $_SERVER['SERVER_ADDR'] == $host)
|| $_SERVER['HTTP_HOST'] == $host)
{
// Sets the environment and makes a run for it
$environment = $name;

1205
jar.php

File diff suppressed because it is too large Load diff

View file

@ -63,7 +63,7 @@ function readFileContents($directory)
foreach ($files as $file)
{
if (!in_array($file, array('.', '..')))
if (strpos($file, '.') != 0)
{
$file = $directory . '/' . $file;