|
@@ 658-660 (lines=3) @@
|
| 655 |
|
|
| 656 |
|
$result = []; |
| 657 |
|
|
| 658 |
|
foreach ($query as $q) { |
| 659 |
|
$result[$q['item_id']] = $q['count'] . ' ' . SStringHelper::Pluralize((int) $q['count'], [lang('review', 'comments'), lang('reviews', 'comments'), lang('review', 'comments')]); |
| 660 |
|
} |
| 661 |
|
|
| 662 |
|
foreach ((array) $ids as $id) { |
| 663 |
|
if (!$result[$id]) { |
|
@@ 662-666 (lines=5) @@
|
| 659 |
|
$result[$q['item_id']] = $q['count'] . ' ' . SStringHelper::Pluralize((int) $q['count'], [lang('review', 'comments'), lang('reviews', 'comments'), lang('review', 'comments')]); |
| 660 |
|
} |
| 661 |
|
|
| 662 |
|
foreach ((array) $ids as $id) { |
| 663 |
|
if (!$result[$id]) { |
| 664 |
|
$result[$id] = 0 . ' ' . SStringHelper::Pluralize('0', [lang('review', 'comments'), lang('reviews', 'comments'), lang('comments', 'comments')]); |
| 665 |
|
} |
| 666 |
|
} |
| 667 |
|
|
| 668 |
|
return $result; |
| 669 |
|
} |