@@ -60,7 +60,7 @@ |
||
| 60 | 60 | DropdownField::create( |
| 61 | 61 | 'EcommerceCountryID', |
| 62 | 62 | 'Country', |
| 63 | - array('' => '-- make sure to select a country --')+$countries |
|
| 63 | + array('' => '-- make sure to select a country --') + $countries |
|
| 64 | 64 | ), |
| 65 | 65 | 'Title' |
| 66 | 66 | ); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | 'Root.FAQPage', |
| 84 | 84 | new LiteralField( |
| 85 | 85 | "FAQPageExplanation", |
| 86 | - "<p class=\"message warning\">FAQ information can only be added to the main country for a ". _t('Distributor.SINGULAR_NAME', 'Distributor') ."</p>" |
|
| 86 | + "<p class=\"message warning\">FAQ information can only be added to the main country for a "._t('Distributor.SINGULAR_NAME', 'Distributor')."</p>" |
|
| 87 | 87 | ) |
| 88 | 88 | ); |
| 89 | 89 | } |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | */ |
| 192 | 192 | public static function get_real_country($country = null) |
| 193 | 193 | { |
| 194 | - if ($country && (! is_object($country))) { |
|
| 194 | + if ($country && (!is_object($country))) { |
|
| 195 | 195 | if (isset(self::$_get_real_country_cache[$country])) { |
| 196 | 196 | return self::$_get_real_country_cache[$country]; |
| 197 | 197 | } else { |
@@ -199,10 +199,10 @@ discard block |
||
| 199 | 199 | } |
| 200 | 200 | } |
| 201 | 201 | $order = ShoppingCart::current_order(); |
| 202 | - if (! $country) { |
|
| 202 | + if (!$country) { |
|
| 203 | 203 | $country = $order->getCountry(); |
| 204 | 204 | } |
| 205 | - if (! $country) { |
|
| 205 | + if (!$country) { |
|
| 206 | 206 | $country = EcommerceCountry::get_country(); |
| 207 | 207 | } |
| 208 | 208 | if ($country instanceof EcommerceCountry) { |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 | } |
| 227 | - if (! $country instanceof EcommerceCountry) { |
|
| 227 | + if (!$country instanceof EcommerceCountry) { |
|
| 228 | 228 | user_error('No country could be found'); |
| 229 | 229 | } |
| 230 | 230 | if (!empty($originalCode)) { |
@@ -239,9 +239,9 @@ discard block |
||
| 239 | 239 | public static function get_backup_country() |
| 240 | 240 | { |
| 241 | 241 | $obj = EcommerceCountry::get()->filter(array("IsBackupCountry" => true))->first(); |
| 242 | - if (! $obj) { |
|
| 242 | + if (!$obj) { |
|
| 243 | 243 | $obj = EcommerceCountry::get()->filter(array("Code" => EcommerceConfig::get('EcommerceCountry', 'default_country_code')))->first(); |
| 244 | - if (! $obj) { |
|
| 244 | + if (!$obj) { |
|
| 245 | 245 | $obj = EcommerceCountry::get()->first(); |
| 246 | 246 | } |
| 247 | 247 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | parse_str($urlParts['query'], $params); |
| 92 | 92 | |
| 93 | 93 | $param = Config::inst()->get('CountryPrice_Page_Controller_Extension', 'locale_get_parameter'); |
| 94 | - $params[$param] = $countryCode; // Overwrite if exists |
|
| 94 | + $params[$param] = $countryCode; // Overwrite if exists |
|
| 95 | 95 | |
| 96 | 96 | // Note that this will url_encode all values |
| 97 | 97 | $urlParts['query'] = http_build_query($params); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | if (function_exists('http_build_url')) { |
| 101 | 101 | $newURL = http_build_url($urlParts); |
| 102 | 102 | } else { |
| 103 | - $newURL = $urlParts['scheme'] . '://' . $urlParts['host'] . $urlParts['path'] . '?' . $urlParts['query']; |
|
| 103 | + $newURL = $urlParts['scheme'].'://'.$urlParts['host'].$urlParts['path'].'?'.$urlParts['query']; |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | if ($oldURL !== $newURL && self::$_redirection_count < 3) { |