From 602589387159f419dab6825d79fc9b885a3e80a6 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Wed, 10 Sep 2014 10:33:16 +0200 Subject: [PATCH] Removing HTTP_BASE env check --- src/Core/functions.php | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/src/Core/functions.php b/src/Core/functions.php index 858f2e917cc..73a9f5c4f91 100644 --- a/src/Core/functions.php +++ b/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; }