new DB code slipped into the old version >_<
This commit is contained in:
parent
8729263ea0
commit
cb1f49e7f6
@ -271,7 +271,7 @@ class CommentList extends SimpleExtension {
|
|||||||
|
|
||||||
$total_pages = $database->cache->get("comment_pages");
|
$total_pages = $database->cache->get("comment_pages");
|
||||||
if(empty($total_pages)) {
|
if(empty($total_pages)) {
|
||||||
$total_pages = (int)($database->get_one("SELECT COUNT(c1) FROM (SELECT COUNT(image_id) AS c1 FROM comments GROUP BY image_id) AS s1") / 10);
|
$total_pages = (int)($database->db->GetOne("SELECT COUNT(c1) FROM (SELECT COUNT(image_id) AS c1 FROM comments GROUP BY image_id) AS s1") / 10);
|
||||||
$database->cache->set("comment_pages", $total_pages, 600);
|
$database->cache->set("comment_pages", $total_pages, 600);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user