From 4ac9ab2ad690b25db9897f31f02bb9249428feb4 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 25 Oct 2020 18:06:30 +0000 Subject: [PATCH] round up number of comment pages instead of rounding down, fixes #755 --- ext/comment/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/comment/main.php b/ext/comment/main.php index 1ee8e38f..28d370dc 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -266,7 +266,7 @@ class CommentList extends Extension $total_pages = $cache->get("comment_pages"); if (empty($total_pages)) { - $total_pages = (int)($database->get_one(" + $total_pages = (int)ceil($database->get_one(" SELECT COUNT(c1) FROM (SELECT COUNT(image_id) AS c1 FROM comments $where GROUP BY image_id) AS s1 ") / 10);