From 5a132dbef098d0e2ea399ed35b9f09bd96ac27a7 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 2 Aug 2011 11:22:37 -0400 Subject: [PATCH] correct pagination for noticelist --- lib/noticelist.php | 4 ++-- lib/threadednoticelist.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/noticelist.php b/lib/noticelist.php index c52380dfc9..3bd7b05b4a 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -84,7 +84,7 @@ class NoticeList extends Widget $this->out->elementStart('ol', array('class' => 'notices xoxo')); $notices = $this->notice->fetchAll(); - + $total = count($notices); $notices = array_slice($notices, 0, NOTICES_PER_PAGE); $this->prefill($notices); @@ -104,7 +104,7 @@ class NoticeList extends Widget $this->out->elementEnd('ol'); $this->out->elementEnd('div'); - return count($notices); + return $total; } /** diff --git a/lib/threadednoticelist.php b/lib/threadednoticelist.php index 45c11453a7..ab25e85e9b 100644 --- a/lib/threadednoticelist.php +++ b/lib/threadednoticelist.php @@ -77,11 +77,11 @@ class ThreadedNoticeList extends NoticeList $this->out->elementStart('ol', array('class' => 'notices threaded-notices xoxo')); $notices = $this->notice->fetchAll(); + $total = count($notices); $notices = array_slice($notices, 0, NOTICES_PER_PAGE); $this->prefill($notices); - $cnt = 0; $conversations = array(); foreach ($notices as $notice) { @@ -120,7 +120,7 @@ class ThreadedNoticeList extends NoticeList $this->out->elementEnd('ol'); $this->out->elementEnd('div'); - return $cnt; + return $total; } /** -- 2.39.5