From 8dcce13297dce70d993956c2e05f2b91f3c19c46 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 11 Dec 2008 18:12:52 -0500 Subject: make a new NoticeList widget and call it from StreamAction I made a new notice-list widget (like the profile list) and call it from StreamAction. This cleans up some of the mess in the various notice-stream-showing classes. I also changed show-stream so it uses a subclass of NoticeList that doesn't show author info (which is unnecessary). darcs-hash:20081211231252-5ed1f-ee6e551ed5a029406748120f12e2ff57c4a86493.gz --- actions/replies.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'actions/replies.php') diff --git a/actions/replies.php b/actions/replies.php index 529ce7e98..835871ffc 100644 --- a/actions/replies.php +++ b/actions/replies.php @@ -85,20 +85,8 @@ class RepliesAction extends StreamAction { $page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; $notice = $user->getReplies(($page-1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1); - - $cnt = 0; - - if ($notice) { - common_element_start('ul', array('id' => 'notices')); - while ($notice->fetch()) { - $cnt++; - if ($cnt > NOTICES_PER_PAGE) { - break; - } - $this->show_notice($notice); - } - common_element_end('ul'); - } + + $cnt = $this->show_notice_list($notice); common_pagination($page > 1, $cnt > NOTICES_PER_PAGE, $page, 'replies', array('nickname' => $user->nickname)); -- cgit v1.2.3-54-g00ecf