File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ public function getDomainName () {
78
78
}
79
79
$ domain = Mage::getBaseUrl ( Mage_Core_Model_Store::URL_TYPE_WEB );
80
80
$ domain = parse_url ( $ domain ) ["host " ];
81
- preg_match ( "/\.? ([^.]+\ .[^.]+) $/im " , $ domain , $ matches );
81
+ preg_match ( "/([^.\s]+\. ([^.\s]{3,}|[^.\s]{2}\ .[^.\s]{2}|[^.\s]{2}))\b $/im " , $ domain , $ matches );
82
82
return $ matches [ 1 ];
83
83
}
84
84
@@ -98,7 +98,7 @@ public function getDomainNames () {
98
98
$ stores = $ group ->getStores ();
99
99
foreach ( $ stores as $ store ) {
100
100
$ domain = parse_url ( $ store ->getBaseUrl () ) ["host " ];
101
- preg_match ( "/\.? ([^.]+\ .[^.]+) $/im " , $ domain , $ matches );
101
+ preg_match ( "/([^.\s]+\. ([^.\s]{3,}|[^.\s]{2}\ .[^.\s]{2}|[^.\s]{2}))\b $/im " , $ domain , $ matches );
102
102
$ domain = $ matches [ 1 ];
103
103
array_push ( $ domains , $ domain );
104
104
}
You can’t perform that action at this time.
0 commit comments