@@ -25,7 +25,7 @@ |
||
| 25 | 25 | $page = @$_GET['page'] ?: 1; |
| 26 | 26 | $count = @$_GET['count'] ?: Config::instance()->module('Shop')->items_per_page; |
| 27 | 27 | if ($Session->user()) { |
| 28 | - $orders = $Orders->get( |
|
| 28 | + $orders = $Orders->get( |
|
| 29 | 29 | $Orders->search( |
| 30 | 30 | [ |
| 31 | 31 | 'user' => $Session->get_user() |
@@ -24,7 +24,8 @@ |
||
| 24 | 24 | $parent != $category['id'] // infinite loop protection |
| 25 | 25 | ) { |
| 26 | 26 | $parent = $Categories->get($category['parent']); |
| 27 | - if ($parent['parent'] == $category['id']) { // infinite loop protection |
|
| 27 | + if ($parent['parent'] == $category['id']) { |
|
| 28 | +// infinite loop protection |
|
| 28 | 29 | break; |
| 29 | 30 | } |
| 30 | 31 | $category['title'] = "$parent[title] :: $category[title]"; |
@@ -109,8 +109,7 @@ |
||
| 109 | 109 | ) |
| 110 | 110 | ], |
| 111 | 111 | [ |
| 112 | - 'class' => $item['listed'] ? 'cs-block-success cs-text-success' : |
|
| 113 | - ($item['in_stock'] || $item['soon'] ? 'cs-block-warning cs-text-warning' : 'cs-block-error cs-text-error') |
|
| 112 | + 'class' => $item['listed'] ? 'cs-block-success cs-text-success' : ($item['in_stock'] || $item['soon'] ? 'cs-block-warning cs-text-warning' : 'cs-block-error cs-text-error') |
|
| 114 | 113 | ] |
| 115 | 114 | ]; |
| 116 | 115 | }, |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | if (!$items) { |
| 114 | 114 | return; |
| 115 | 115 | } |
| 116 | -$items_total = $Items->search( |
|
| 116 | +$items_total = $Items->search( |
|
| 117 | 117 | [ |
| 118 | 118 | 'listed' => 1, |
| 119 | 119 | 'category' => $current_category, |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | use |
| 23 | 23 | Singleton; |
| 24 | 24 | |
| 25 | - protected $data_model = [ |
|
| 25 | + protected $data_model = [ |
|
| 26 | 26 | 'id' => 'int', |
| 27 | 27 | 'amount' => 'float:0', |
| 28 | 28 | 'currency' => 'text', |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | 'alias' => $_custom_class, |
| 118 | 118 | 'path' => $custom_class_path |
| 119 | 119 | ]; |
| 120 | - $next_alias = $custom_class; |
|
| 120 | + $next_alias = $custom_class; |
|
| 121 | 121 | } |
| 122 | 122 | $modified_classes[$class] = [ |
| 123 | 123 | 'aliases' => $aliases, |
@@ -67,8 +67,7 @@ |
||
| 67 | 67 | * |
| 68 | 68 | * @throws ExitException |
| 69 | 69 | */ |
| 70 | - public function init ($server, $query, $data, $files, $data_stream, $cookie, $request_started) { |
|
| 71 | - ++static::$id; |
|
| 70 | + public function init ($server, $query, $data, $files, $data_stream, $cookie, $request_started) {++static::$id; |
|
| 72 | 71 | $this->init_server($server); |
| 73 | 72 | $this->init_query($query); |
| 74 | 73 | $this->init_data_and_files($data, $files, $data_stream); |
@@ -18,8 +18,7 @@ |
||
| 18 | 18 | * |
| 19 | 19 | * @throws \cs\ExitException |
| 20 | 20 | */ |
| 21 | - public static function init_from_psr7 ($Psr7_request) { |
|
| 22 | - ++System_request::$id; |
|
| 21 | + public static function init_from_psr7 ($Psr7_request) {++System_request::$id; |
|
| 23 | 22 | $System_request = System_request::instance(); |
| 24 | 23 | self::from_psr7_server($System_request, $Psr7_request); |
| 25 | 24 | self::from_psr7_query($System_request, $Psr7_request); |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | return true; |
| 109 | 109 | } |
| 110 | 110 | ); |
| 111 | - $methods = _strtoupper(_substr($methods, strlen($method_name) + 1)); |
|
| 111 | + $methods = _strtoupper(_substr($methods, strlen($method_name) + 1)); |
|
| 112 | 112 | natcasesort($methods); |
| 113 | 113 | return array_values($methods); |
| 114 | 114 | } |