From dba9d71abda39baafc0804afa8e4445eaa587c50 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 23 Sep 2011 17:18:21 -0400 Subject: [PATCH] Support mode in all --- actions/all.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/actions/all.php b/actions/all.php index a987ebbadb..bab59a7d03 100644 --- a/actions/all.php +++ b/actions/all.php @@ -1,7 +1,7 @@ user, Profile::current()); + $this->mode = $this->trimmed('mode', 'conversation'); + + if ($this->mode == 'stream') { + $stream = new InboxNoticeStream($this->user, Profile::current()); + } else { + $stream = new ThreadingInboxNoticeStream($this->user, Profile::current()); + } $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1); @@ -176,7 +183,11 @@ class AllAction extends ProfileAction $profile = $current_user->getProfile(); } - $nl = new ThreadedNoticeList($this->notice, $this, $profile); + if ($this->mode == 'stream') { + $nl = new NoticeList($this->notice, $this); + } else { + $nl = new ThreadedNoticeList($this->notice, $this, $profile); + } $cnt = $nl->show(); -- 2.39.5