@@ -27,10 +27,10 @@ discard block |
||
| 27 | 27 | $countryID = 0; |
| 28 | 28 | $param = Config::inst()->get('CountryPrice_Translation', 'locale_get_parameter'); |
| 29 | 29 | $countryObject = CountryPrice_EcommerceCountry::get_real_country(); |
| 30 | - if($countryObject && $countryObject->Code) { |
|
| 30 | + if ($countryObject && $countryObject->Code) { |
|
| 31 | 31 | if (isset($_GET[$param])) { |
| 32 | 32 | $countryCode = preg_replace("/[^A-Z]+/", "", strtoupper(Convert::raw2sql($_GET[$param]))); |
| 33 | - if($countryCode) { |
|
| 33 | + if ($countryCode) { |
|
| 34 | 34 | if (strtoupper($countryObject->Code) != $countryCode) { |
| 35 | 35 | return $this->owner->redirect( |
| 36 | 36 | CountryPrices_ChangeCountryController::new_country_link($countryCode) |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $oldURL = $protocol.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; |
| 100 | 100 | |
| 101 | 101 | $hasCountrySegment = CountryPrice_Translation::get_country_url_provider()->hasCountrySegment($oldURL); |
| 102 | - if($hasCountrySegment){ |
|
| 102 | + if ($hasCountrySegment) { |
|
| 103 | 103 | $newURL = CountryPrice_Translation::get_country_url_provider()->replaceCountryCodeInUrl($countryCode, $oldURL); |
| 104 | 104 | } |
| 105 | 105 | else { |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | public function AlternativeHrefLangLinksCachingKey() |
| 155 | 155 | { |
| 156 | 156 | $countryObject = CountryPrice_EcommerceCountry::get_real_country(); |
| 157 | - if($countryObject && $countryObject->Code) { |
|
| 157 | + if ($countryObject && $countryObject->Code) { |
|
| 158 | 158 | return 'AlternativeHrefLangLinksCachingKey-'.$countryObject->Code.'-'.$this->owner->dataRecord->ID.'-'.strtotime($this->owner->dataRecord->LastEdited); |
| 159 | 159 | } |
| 160 | 160 | return 'AlternativeHrefLangLinksCachingKey'.$this->owner->dataRecord->ID.'-'.$this->owner->dataRecord->ID.'-'.strtotime($this->owner->dataRecord->LastEdited); |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | public function UpdateCanonicalLink(&$link) |
| 168 | 168 | { |
| 169 | 169 | $obj = $this->owner->dataRecord->CanonicalObject(); |
| 170 | - if($obj) { |
|
| 170 | + if ($obj) { |
|
| 171 | 171 | $link = $obj->Link(); |
| 172 | 172 | } else { |
| 173 | 173 | $link = $this->owner->dataRecord->AbsoluteLink(); |