|
@@ 641-643 (lines=3) @@
|
| 638 |
|
|
| 639 |
|
$result = []; |
| 640 |
|
|
| 641 |
|
foreach ($query as $q) { |
| 642 |
|
$result[$q['item_id']] = $q['count'] . ' ' . SStringHelper::Pluralize((int) $q['count'], [lang('review', 'comments'), lang('reviews', 'comments'), lang('review', 'comments')]); |
| 643 |
|
} |
| 644 |
|
|
| 645 |
|
foreach ((array) $ids as $id) { |
| 646 |
|
if (!$result[$id]) { |
|
@@ 645-649 (lines=5) @@
|
| 642 |
|
$result[$q['item_id']] = $q['count'] . ' ' . SStringHelper::Pluralize((int) $q['count'], [lang('review', 'comments'), lang('reviews', 'comments'), lang('review', 'comments')]); |
| 643 |
|
} |
| 644 |
|
|
| 645 |
|
foreach ((array) $ids as $id) { |
| 646 |
|
if (!$result[$id]) { |
| 647 |
|
$result[$id] = 0 . ' ' . SStringHelper::Pluralize('0', [lang('review', 'comments'), lang('reviews', 'comments'), lang('comments', 'comments')]); |
| 648 |
|
} |
| 649 |
|
} |
| 650 |
|
|
| 651 |
|
return $result; |
| 652 |
|
} |