@@ -21,7 +21,7 @@ |
||
21 | 21 | use |
22 | 22 | CRUD_helpers, |
23 | 23 | Singleton; |
24 | - protected $data_model = [ |
|
24 | + protected $data_model = [ |
|
25 | 25 | 'id' => 'int', |
26 | 26 | 'title' => 'ml:text', |
27 | 27 | 'path' => 'ml:text', |
@@ -226,7 +226,7 @@ |
||
226 | 226 | * |
227 | 227 | * @return array|false |
228 | 228 | */ |
229 | - protected static function &get_block_by_index ($index) { |
|
229 | + protected static function &get_block_by_index($index) { |
|
230 | 230 | /** |
231 | 231 | * @var array $blocks |
232 | 232 | */ |
@@ -122,7 +122,7 @@ |
||
122 | 122 | 'value', |
123 | 123 | 'id' |
124 | 124 | ); |
125 | - $data['users'] = array_column( |
|
125 | + $data['users'] = array_column( |
|
126 | 126 | $User->db()->qfa( |
127 | 127 | "SELECT |
128 | 128 | `id`, |
@@ -34,7 +34,7 @@ |
||
34 | 34 | Clean the whole system public cache: |
35 | 35 | <g>./cli clean_public_cache:System/optimization</g> |
36 | 36 | |
37 | -HELP; |
|
37 | +help; |
|
38 | 38 | } |
39 | 39 | /** |
40 | 40 | * Clean cache |
@@ -36,6 +36,6 @@ |
||
36 | 36 | Print help information (this message) for System module: |
37 | 37 | <g>./cli help:System</g> |
38 | 38 | |
39 | -HELP; |
|
39 | +help; |
|
40 | 40 | } |
41 | 41 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * @var Prefix |
28 | 28 | */ |
29 | 29 | protected $cache; |
30 | - protected $data_model = [ |
|
30 | + protected $data_model = [ |
|
31 | 31 | 'id' => 'int', |
32 | 32 | 'poll' => 'int', |
33 | 33 | 'title' => 'ml:string', |
@@ -27,7 +27,7 @@ |
||
27 | 27 | * @var Prefix |
28 | 28 | */ |
29 | 29 | protected $cache; |
30 | - protected $data_model = [ |
|
30 | + protected $data_model = [ |
|
31 | 31 | 'id' => 'int', |
32 | 32 | 'title' => 'ml:string' |
33 | 33 | ]; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | const DEFAULT_IMAGE = 'modules/Shop/assets/img/no-image.svg'; |
57 | 57 | |
58 | - protected $data_model = [ |
|
58 | + protected $data_model = [ |
|
59 | 59 | 'id' => 'int:0', |
60 | 60 | 'date' => 'int:0', |
61 | 61 | 'category' => 'int:0', |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | 'string' => '', |
438 | 438 | 'text' => '' |
439 | 439 | ]; |
440 | - $lang = ''; |
|
440 | + $lang = ''; |
|
441 | 441 | switch ($this->attribute_type_to_value_field($attribute_data['type'])) { |
442 | 442 | case 'numeric_value': |
443 | 443 | $value_type['numeric'] = $value; |
@@ -280,17 +280,20 @@ |
||
280 | 280 | $where = []; |
281 | 281 | $where_params = []; |
282 | 282 | foreach ($search_parameters as $key => $details) { |
283 | - if (isset($this->data_model[$key])) { // Property |
|
283 | + if (isset($this->data_model[$key])) { |
|
284 | +// Property |
|
284 | 285 | $where[] = "`i`.`$key` = ?"; |
285 | 286 | $where_params[] = $details; |
286 | - } elseif (is_numeric($key)) { // Tag |
|
287 | + } elseif (is_numeric($key)) { |
|
288 | +// Tag |
|
287 | 289 | $joins .= |
288 | 290 | "INNER JOIN `{$this->table}_tags` AS `t` |
289 | 291 | ON |
290 | 292 | `i`.`id` = `t`.`id` AND |
291 | 293 | `t`.`tag` = ?"; |
292 | 294 | $where_params[] = $details; |
293 | - } else { // Attribute |
|
295 | + } else { |
|
296 | +// Attribute |
|
294 | 297 | $field = @$this->attribute_type_to_value_field($Attributes->get($key)['type']); |
295 | 298 | if (!$field || empty($details)) { |
296 | 299 | continue; |
@@ -54,7 +54,7 @@ |
||
54 | 54 | @$_GET['asc'] |
55 | 55 | ) ?: [] |
56 | 56 | ); |
57 | -$orders_total = $Orders->search( |
|
57 | +$orders_total = $Orders->search( |
|
58 | 58 | [ |
59 | 59 | 'total_count' => 1 |
60 | 60 | ] + (array)$_GET, |