From f9f425c7c639824d1884dc8fde4003daaf8552aa Mon Sep 17 00:00:00 2001 From: darkfriend Date: Fri, 19 Jul 2019 00:23:19 +0300 Subject: [PATCH] up to 0.1.36 --- utf8/dev2fun.multidomain/classes/general/SubDomain.php | 4 +++- utf8/dev2fun.multidomain/install/version.php | 4 ++-- win1251/dev2fun.multidomain/classes/general/SubDomain.php | 4 +++- win1251/dev2fun.multidomain/install/version.php | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/utf8/dev2fun.multidomain/classes/general/SubDomain.php b/utf8/dev2fun.multidomain/classes/general/SubDomain.php index e93e7f3..242de57 100644 --- a/utf8/dev2fun.multidomain/classes/general/SubDomain.php +++ b/utf8/dev2fun.multidomain/classes/general/SubDomain.php @@ -2,7 +2,7 @@ /** * @package subdomain * @author darkfriend - * @version 0.1.35 + * @version 0.1.36 */ namespace Dev2fun\MultiDomain; @@ -334,6 +334,7 @@ public function getSubDomain() { // $subdomain = $this->getCookie(); // if (!$subdomain) { $subdomain = $this->searchSubdomain(); + if(!$subdomain) return false; $fullDomain = $this->getFullDomain($subdomain); // } // var_dump($fullDomain, $this->domainToLang); @@ -361,6 +362,7 @@ public function searchSubdomain() { $config = Config::getInstance(); $keyIp = $config->get('key_ip'); if (!$keyIp) $keyIp = 'HTTP_X_REAL_IP'; + if(empty($_SERVER[$keyIp])) return false; $record = (new Geo())->setIp($_SERVER[$keyIp]); if ($config->get('type_subdomain') == 'city') { return $record->getCityCode(); diff --git a/utf8/dev2fun.multidomain/install/version.php b/utf8/dev2fun.multidomain/install/version.php index 475a684..29200a6 100644 --- a/utf8/dev2fun.multidomain/install/version.php +++ b/utf8/dev2fun.multidomain/install/version.php @@ -1,6 +1,6 @@ "0.1.35", - "VERSION_DATE" => "2019-07-11 10:00:00", + "VERSION" => "0.1.36", + "VERSION_DATE" => "2019-07-19 10:00:00", ); ?> \ No newline at end of file diff --git a/win1251/dev2fun.multidomain/classes/general/SubDomain.php b/win1251/dev2fun.multidomain/classes/general/SubDomain.php index e93e7f3..242de57 100644 --- a/win1251/dev2fun.multidomain/classes/general/SubDomain.php +++ b/win1251/dev2fun.multidomain/classes/general/SubDomain.php @@ -2,7 +2,7 @@ /** * @package subdomain * @author darkfriend - * @version 0.1.35 + * @version 0.1.36 */ namespace Dev2fun\MultiDomain; @@ -334,6 +334,7 @@ public function getSubDomain() { // $subdomain = $this->getCookie(); // if (!$subdomain) { $subdomain = $this->searchSubdomain(); + if(!$subdomain) return false; $fullDomain = $this->getFullDomain($subdomain); // } // var_dump($fullDomain, $this->domainToLang); @@ -361,6 +362,7 @@ public function searchSubdomain() { $config = Config::getInstance(); $keyIp = $config->get('key_ip'); if (!$keyIp) $keyIp = 'HTTP_X_REAL_IP'; + if(empty($_SERVER[$keyIp])) return false; $record = (new Geo())->setIp($_SERVER[$keyIp]); if ($config->get('type_subdomain') == 'city') { return $record->getCityCode(); diff --git a/win1251/dev2fun.multidomain/install/version.php b/win1251/dev2fun.multidomain/install/version.php index 475a684..29200a6 100644 --- a/win1251/dev2fun.multidomain/install/version.php +++ b/win1251/dev2fun.multidomain/install/version.php @@ -1,6 +1,6 @@ "0.1.35", - "VERSION_DATE" => "2019-07-11 10:00:00", + "VERSION" => "0.1.36", + "VERSION_DATE" => "2019-07-19 10:00:00", ); ?> \ No newline at end of file