round up number of comment pages instead of rounding down, fixes #755

This commit is contained in:
Shish 2020-10-25 18:06:30 +00:00
parent 91d04bad5d
commit 4ac9ab2ad6

View file

@ -266,7 +266,7 @@ class CommentList extends Extension
$total_pages = $cache->get("comment_pages"); $total_pages = $cache->get("comment_pages");
if (empty($total_pages)) { if (empty($total_pages)) {
$total_pages = (int)($database->get_one(" $total_pages = (int)ceil($database->get_one("
SELECT COUNT(c1) SELECT COUNT(c1)
FROM (SELECT COUNT(image_id) AS c1 FROM comments $where GROUP BY image_id) AS s1 FROM (SELECT COUNT(image_id) AS c1 FROM comments $where GROUP BY image_id) AS s1
") / 10); ") / 10);