From: Evan Prodromou Date: Thu, 25 Aug 2011 15:50:45 +0000 (-0400) Subject: use new stream class rather than old Notice::publicStream() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0692d9c04709fb56db74328e7150bb3f113ab07d;p=quix0rs-gnu-social.git use new stream class rather than old Notice::publicStream() --- 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; }