Skip to content

Commit

Permalink
up to 0.1.36
Browse files Browse the repository at this point in the history
  • Loading branch information
darkfriend committed Jul 18, 2019
1 parent e3af9d7 commit f9f425c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion utf8/dev2fun.multidomain/classes/general/SubDomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @package subdomain
* @author darkfriend
* @version 0.1.35
* @version 0.1.36
*/

namespace Dev2fun\MultiDomain;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions utf8/dev2fun.multidomain/install/version.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
$arModuleVersion = array(
"VERSION" => "0.1.35",
"VERSION_DATE" => "2019-07-11 10:00:00",
"VERSION" => "0.1.36",
"VERSION_DATE" => "2019-07-19 10:00:00",
);
?>
4 changes: 3 additions & 1 deletion win1251/dev2fun.multidomain/classes/general/SubDomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @package subdomain
* @author darkfriend
* @version 0.1.35
* @version 0.1.36
*/

namespace Dev2fun\MultiDomain;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions win1251/dev2fun.multidomain/install/version.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
$arModuleVersion = array(
"VERSION" => "0.1.35",
"VERSION_DATE" => "2019-07-11 10:00:00",
"VERSION" => "0.1.36",
"VERSION_DATE" => "2019-07-19 10:00:00",
);
?>

0 comments on commit f9f425c

Please sign in to comment.