Skip to content

Commit

Permalink
[numeric_score] use Search::get_images() to find images only when the…
Browse files Browse the repository at this point in the history
…y match the visibility settings, fixes shish#563
  • Loading branch information
shish committed Jan 4, 2024
1 parent 9e1f0e7 commit 889f595
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ext/numeric_score/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,8 @@ public function onPageRequest(PageRequestEvent $event)

//filter images by score != 0 + date > limit to max images on one page > order from highest to lowest score

$result = $database->get_col($sql, $args);
$images = [];
foreach ($result as $id) {
$images[] = Image::by_id((int)$id);
}

$ids = $database->get_col($sql, $args);
$images = Search::get_images($ids);
$this->theme->view_popular($images, $dte);
}
}
Expand Down

0 comments on commit 889f595

Please sign in to comment.