correct pagination for noticelist
This commit is contained in:
parent
14fe22e430
commit
5a132dbef0
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user