Completed
Push — master ( 96ffdd...44db84 )
by
unknown
02:19
created
code/control/CountryPrice_ChangeCountryController.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,8 +120,7 @@
 block discarded – undo
120 120
             $hasCountrySegment = CountryPrice_Translation::get_country_url_provider()->hasCountrySegment($url);
121 121
             if($hasCountrySegment){
122 122
                 $url = CountryPrice_Translation::get_country_url_provider()->replaceCountryCodeInUrl($newCountryCode, $url);
123
-            }
124
-            else {
123
+            } else {
125 124
                 $url = CountryPrice_Translation::get_country_url_provider()->addCountryCodeToUrl($newCountryCode, $url);
126 125
             }
127 126
             return $url.$query;
Please login to merge, or discard this patch.
code/control/CountryPrice_Page_Controller_Extension.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@
 block discarded – undo
101 101
         $hasCountrySegment = CountryPrice_Translation::get_country_url_provider()->hasCountrySegment($oldURL);
102 102
         if($hasCountrySegment){
103 103
             $newURL = CountryPrice_Translation::get_country_url_provider()->replaceCountryCodeInUrl($countryCode, $oldURL);
104
-        }
105
-        else {
104
+        } else {
106 105
             $newURL = CountryPrice_Translation::get_country_url_provider()->addCountryCodeToUrl($countryCode, $oldURL);
107 106
         }
108 107
         if ($oldURL !== $newURL && self::$_redirection_count < 3) {
Please login to merge, or discard this patch.