Completed
Push — master ( 1717c1...fbb6b4 )
by Nicolaas
04:07
created
code/control/CountryPrice_ChangeCountryController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
         }
59 59
         CountryPrice_OrderDOD::localise_order($newCountryCode, true);
60 60
         $param = Config::inst()->get('CountryPrice_Translation', 'locale_get_parameter');
61
-        if(isset($_GET['force']) && $_GET['force']) {
62
-            return $this->redirect(self::$url_segment . '/changeto/' .$newCountryCode . '/'. '?force-back-home');
61
+        if (isset($_GET['force']) && $_GET['force']) {
62
+            return $this->redirect(self::$url_segment.'/changeto/'.$newCountryCode.'/'.'?force-back-home');
63 63
         }
64
-        if(isset($_GET['force-back-home']) || $_GET['force-back-home']) {
64
+        if (isset($_GET['force-back-home']) || $_GET['force-back-home']) {
65 65
             return $this->redirect('/');
66 66
         }
67 67
         return $this->redirect($this->findNewURL($param, $newCountryCode));
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
 
121 121
             $path = isset($parsedUrl['path']) ? $parsedUrl['path'] : '';
122 122
 
123
-            $query = !empty($query) ? '?'. http_build_query($query) : '';
123
+            $query = !empty($query) ? '?'.http_build_query($query) : '';
124 124
 
125 125
             $hasCountrySegment = CountryPrice_Translation::get_country_url_provider()->hasCountrySegment($url);
126
-            if($hasCountrySegment){
126
+            if ($hasCountrySegment) {
127 127
                 $url = CountryPrice_Translation::get_country_url_provider()->replaceCountryCodeInUrl($newCountryCode, $url);
128 128
             }
129 129
             else {
Please login to merge, or discard this patch.