From b599fc22b639f18db9c04eb96e23b14d4bae065d Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 17 Jan 2010 09:19:52 +0000 Subject: [PATCH] fix note pagination --- contrib/notes/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/notes/main.php b/contrib/notes/main.php index 30cfd582..92da72fd 100644 --- a/contrib/notes/main.php +++ b/contrib/notes/main.php @@ -436,7 +436,7 @@ class Notes extends SimpleExtension { $result = $database->Execute($get_notes, array(1, $pageNumber * $notesPerPage, $notesPerPage)); - $totalPages = ceil($database->db->GetOne("SELECT COUNT(*) FROM notes") / $notesPerPage); + $totalPages = ceil($database->db->GetOne("SELECT COUNT(DISTINCT image_id) FROM notes") / $notesPerPage); $images = array(); while(!$result->EOF) {