From 889f5950767b9662843dc5e6af077425303038d2 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 4 Jan 2024 16:08:53 +0000 Subject: [PATCH] [numeric_score] use Search::get_images() to find images only when they match the visibility settings, fixes #563 --- ext/numeric_score/main.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ext/numeric_score/main.php b/ext/numeric_score/main.php index 028eca694..7f8f3f63a 100644 --- a/ext/numeric_score/main.php +++ b/ext/numeric_score/main.php @@ -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); } }