new DB code slipped into the old version >_<

This commit is contained in:
Shish 2011-03-24 17:52:15 +00:00
parent 8729263ea0
commit cb1f49e7f6

View File

@ -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);
} }