Skip to content

Commit

Permalink
Merge pull request #11161 from mrclay/11160_likes
Browse files Browse the repository at this point in the history
fix(likes): listing limit no longer breaks likes counts
  • Loading branch information
jeabakker committed Aug 16, 2017
2 parents a42b725 + abbe271 commit 2045066
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mod/likes/classes/Elgg/Likes/Preloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ protected function preloadCountsFromQuery(array $guids) {
'guids' => $guids,
'selects' => array('e.guid', 'COUNT(*) AS cnt'),
'group_by' => 'e.guid',
'limit' => false,
'callback' => false,
));
foreach ($guids as $guid) {
Expand Down Expand Up @@ -86,6 +87,7 @@ protected function preloadCurrentUserLikes(array $guids) {
'annotation_names' => 'likes',
'annotation_owner_guids' => $owner_guid,
'guids' => $guids,
'limit' => false,
'callback' => false,
));

Expand Down Expand Up @@ -159,6 +161,7 @@ protected function getEntities(array $guids) {
if ($fetch_guids) {
$fetched = elgg_get_entities(array(
'guids' => $fetch_guids,
'limit' => false,
));
array_splice($entities, count($entities), 0, $fetched);
}
Expand Down

0 comments on commit 2045066

Please sign in to comment.