use new stream class rather than old Notice::publicStream()
This commit is contained in:
parent
3fbcba40a6
commit
0692d9c047
|
@ -258,14 +258,18 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
|
||||||
{
|
{
|
||||||
$notices = array();
|
$notices = array();
|
||||||
|
|
||||||
$notice = Notice::publicStream(
|
$profile = ($this->auth_user) ? $this->auth_user->getProfile() : null;
|
||||||
($this->page - 1) * $this->count, $this->count, $this->since_id,
|
|
||||||
$this->max_id
|
|
||||||
);
|
|
||||||
|
|
||||||
while ($notice->fetch()) {
|
$stream = new PublicNoticeStream($profile);
|
||||||
$notices[] = clone($notice);
|
|
||||||
}
|
$notice = $stream->getNotices(($this->page - 1) * $this->count,
|
||||||
|
$this->count,
|
||||||
|
$this->since_id,
|
||||||
|
$this->max_id);
|
||||||
|
|
||||||
|
$notices = $notice->fetchAll();
|
||||||
|
|
||||||
|
NoticeList::prefill($notices);
|
||||||
|
|
||||||
return $notices;
|
return $notices;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user