From 3b456b4ffe0b1da8a378630574988a9d7a75f9bd Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 28 Feb 2011 15:40:43 -0800 Subject: [PATCH] Paging fix for threaded notice lists --- lib/threadednoticelist.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/threadednoticelist.php b/lib/threadednoticelist.php index d95a187980..c1c4b4f36a 100644 --- a/lib/threadednoticelist.php +++ b/lib/threadednoticelist.php @@ -69,6 +69,12 @@ class ThreadedNoticeList extends NoticeList $cnt = 0; $conversations = array(); while ($this->notice->fetch() && $cnt <= NOTICES_PER_PAGE) { + $cnt++; + + if ($cnt > NOTICES_PER_PAGE) { + break; + } + $convo = $this->notice->conversation; if (!empty($conversations[$convo])) { // Seen this convo already -- skip! @@ -86,12 +92,6 @@ class ThreadedNoticeList extends NoticeList $notice->limit(1); $notice->find(true); - $cnt++; - - if ($cnt > NOTICES_PER_PAGE) { - break; - } - try { $item = $this->newListItem($notice); $item->show(); -- 2.39.5