Skip to content

Commit d820344

Browse files
author
Rafael Grigorian
committed
Fixed #100
1 parent 3247d6a commit d820344

File tree

1 file changed

+3
-3
lines changed
  • src/app/code/community/JetRails/Cloudflare/Helper

1 file changed

+3
-3
lines changed

src/app/code/community/JetRails/Cloudflare/Helper/Data.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function getDomainName () {
7878
}
7979
$domain = Mage::getBaseUrl ( Mage_Core_Model_Store::URL_TYPE_WEB );
8080
$domain = parse_url ( $domain ) ["host"];
81-
preg_match ( "/\.?([^.]+\.[^.]+)$/i", $domain, $matches );
81+
preg_match ( "/\.?([^.]+\.[^.]+)$/im", $domain, $matches );
8282
return $matches [ 1 ];
8383
}
8484

@@ -98,15 +98,15 @@ public function getDomainNames () {
9898
$stores = $group->getStores ();
9999
foreach ( $stores as $store ) {
100100
$domain = parse_url ( $store->getBaseUrl () ) ["host"];
101+
preg_match ( "/\.?([^.]+\.[^.]+)$/im", $domain, $matches );
102+
$domain = $matches [ 1 ];
101103
array_push ( $domains, $domain );
102104
}
103105
}
104106
}
105107
$domains = array_unique ( $domains );
106108
sort ( $domains );
107109
$domains = array_map ( function ( $domain ) use ( $selection ) {
108-
preg_match ( "/\.?([^.]+\.[^.]+)$/i", $domain, $matches );
109-
$domain = $matches [ 1 ];
110110
return array (
111111
"name" => $domain,
112112
"active" => $domain == $selection,

0 commit comments

Comments
 (0)