@@ -71,7 +71,7 @@ |
||
| 71 | 71 | $where[] = ['data', $_GET['data']]; |
| 72 | 72 | } |
| 73 | 73 | $pays = Money\Pay::getList(['where' => $where, 'order' => ['date_create', 'DESC']]); |
| 74 | - if(count($pays)===1){ |
|
| 74 | + if(count($pays)===1) { |
|
| 75 | 75 | Tools::redirect('/money/merchants/pay/'.current($pays)->id); |
| 76 | 76 | } |
| 77 | 77 | $this->view->page(['content' => 'pays', 'data' => compact('bread', 'pays')]); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | ['user_id', $userId], |
| 66 | 66 | ['hash', $hash] |
| 67 | 67 | ]); |
| 68 | - if(!$session){ |
|
| 68 | + if(!$session) { |
|
| 69 | 69 | if (!headers_sent()) { |
| 70 | 70 | setcookie($this->cookiePrefix . "_user_session_hash", '', 0, "/"); |
| 71 | 71 | setcookie($this->cookiePrefix . "_user_id", '', 0, "/"); |
@@ -243,17 +243,20 @@ discard block |
||
| 243 | 243 | * @return boolean|\Users\User |
| 244 | 244 | */ |
| 245 | 245 | public function get($idn, $ltype = 'id') { |
| 246 | - if (!$idn) |
|
| 247 | - return false; |
|
| 246 | + if (!$idn) { |
|
| 247 | + return false; |
|
| 248 | + } |
|
| 248 | 249 | |
| 249 | - if (is_numeric($idn) && $ltype != 'login') |
|
| 250 | - $user = Users\User::get($idn, 'id'); |
|
| 251 | - elseif ($ltype == 'login') |
|
| 252 | - $user = Users\User::get($idn, 'login'); |
|
| 253 | - else |
|
| 254 | - $user = Users\User::get($idn, 'mail'); |
|
| 255 | - if (!$user) |
|
| 256 | - return []; |
|
| 250 | + if (is_numeric($idn) && $ltype != 'login') { |
|
| 251 | + $user = Users\User::get($idn, 'id'); |
|
| 252 | + } elseif ($ltype == 'login') { |
|
| 253 | + $user = Users\User::get($idn, 'login'); |
|
| 254 | + } else { |
|
| 255 | + $user = Users\User::get($idn, 'mail'); |
|
| 256 | + } |
|
| 257 | + if (!$user) { |
|
| 258 | + return []; |
|
| 259 | + } |
|
| 257 | 260 | |
| 258 | 261 | return $user; |
| 259 | 262 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | }, |
| 21 | 21 | 'getValueText' => function ($value, $params) { |
| 22 | 22 | $value = \Ecommerce\Delivery\Field\Item::get($value); |
| 23 | - if($value){ |
|
| 23 | + if($value) { |
|
| 24 | 24 | return $value->value; |
| 25 | 25 | } |
| 26 | 26 | return ''; |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | if (!empty($alias)) { |
| 9 | 9 | $slider = Sliders\Slider::get($alias, 'alias'); |
| 10 | 10 | } |
| 11 | -if(empty($slider)){ |
|
| 11 | +if(empty($slider)) { |
|
| 12 | 12 | echo 'Slider not found'; |
| 13 | 13 | return; |
| 14 | 14 | } |
@@ -238,8 +238,7 @@ |
||
| 238 | 238 | $opts = array_unique($opts); |
| 239 | 239 | if($opts) { |
| 240 | 240 | $options = \Ecommerce\Item\Option::getList(['where' => [['item_option_searchable', 1], ['id', $opts, 'IN']], 'order' => ['weight', 'asc']]); |
| 241 | - } |
|
| 242 | - else { |
|
| 241 | + } else { |
|
| 243 | 242 | $options=[]; |
| 244 | 243 | } |
| 245 | 244 | } elseif (empty(App::$cur->ecommerce->config['filtersInLast'])) { |
@@ -35,8 +35,11 @@ |
||
| 35 | 35 | $contents = curl_exec($c); |
| 36 | 36 | curl_close($c); |
| 37 | 37 | |
| 38 | - if ($contents) return $contents; |
|
| 39 | - else return FALSE; |
|
| 38 | + if ($contents) { |
|
| 39 | + return $contents; |
|
| 40 | + } else { |
|
| 41 | + return FALSE; |
|
| 42 | + } |
|
| 40 | 43 | } |
| 41 | 44 | |
| 42 | 45 | static function calcPrice($cart) { |