From 0692d9c04709fb56db74328e7150bb3f113ab07d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 25 Aug 2011 11:50:45 -0400 Subject: [PATCH] use new stream class rather than old Notice::publicStream() --- actions/apitimelinepublic.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/actions/apitimelinepublic.php b/actions/apitimelinepublic.php index 47e253d5fd..b82e01aafe 100644 --- a/actions/apitimelinepublic.php +++ b/actions/apitimelinepublic.php @@ -258,14 +258,18 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction { $notices = array(); - $notice = Notice::publicStream( - ($this->page - 1) * $this->count, $this->count, $this->since_id, - $this->max_id - ); + $profile = ($this->auth_user) ? $this->auth_user->getProfile() : null; - while ($notice->fetch()) { - $notices[] = clone($notice); - } + $stream = new PublicNoticeStream($profile); + + $notice = $stream->getNotices(($this->page - 1) * $this->count, + $this->count, + $this->since_id, + $this->max_id); + + $notices = $notice->fetchAll(); + + NoticeList::prefill($notices); return $notices; }