Skip to content
Permalink
Browse files

Removing HTTP_BASE env check

  • Loading branch information...
lorenzo committed Sep 10, 2014
1 parent a9f2937 commit 602589387159f419dab6825d79fc9b885a3e80a6
Showing with 0 additions and 39 deletions.
  1. +0 −39 src/Core/functions.php
@@ -191,45 +191,6 @@ function env($key) {
return str_replace(env('DOCUMENT_ROOT'), '', env('SCRIPT_FILENAME'));
case 'CGI_MODE':
return (PHP_SAPI === 'cgi');
case 'HTTP_BASE':
$host = env('HTTP_HOST');
$parts = explode('.', $host);
$count = count($parts);
if ($count === 1) {
return '.' . $host;
} elseif ($count === 2) {
return '.' . $host;
} elseif ($count === 3) {
$gTLD = array(
'aero',
'asia',
'biz',
'cat',
'com',
'coop',
'edu',
'gov',
'info',
'int',
'jobs',
'mil',
'mobi',
'museum',
'name',
'net',
'org',
'pro',
'tel',
'travel',
'xxx'
);
if (in_array($parts[1], $gTLD)) {
return '.' . $host;
}
}
array_shift($parts);
return '.' . implode('.', $parts);
}
return null;
}

0 comments on commit 6025893

Please sign in to comment.
You can’t perform that action at this time.