@@ -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]"; |
@@ -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; |