[numeric_score] use Search::get_images() to find images only when they match the visibility settings, fixes #563

This commit is contained in:
Shish 2024-01-04 16:08:53 +00:00
parent 9e1f0e792d
commit 889f595076

View file

@ -224,12 +224,8 @@ class NumericScore extends Extension
//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);
}
}