X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpublicrss.php;h=1ab6a8be06aa4214397ce5844a5d536e23fed535;hb=31d5b61ca7daf72a847aed50eb65b672b52766f5;hp=185a4ff785f192c90202a70f0680485579df0256;hpb=5f79bcdf51e0cbc17f62c6899207813f26a29214;p=quix0rs-gnu-social.git diff --git a/actions/publicrss.php b/actions/publicrss.php index 185a4ff785..1ab6a8be06 100644 --- a/actions/publicrss.php +++ b/actions/publicrss.php @@ -30,27 +30,15 @@ class PublicrssAction extends Rss10Action { } function get_notices($limit=0) { - - $user = $this->user; + $notices = array(); - - $notice = new Notice(); - - # XXX: bad performance - - $notice->is_local = 1; - - $notice->orderBy('created DESC, notice.id DESC'); - - if ($limit != 0) { - $notice->limit(0, $limit); - } - $notice->find(); - + + $notice = Notice::publicStream(0, ($limit == 0) ? 48 : $limit); + while ($notice->fetch()) { $notices[] = clone($notice); } - + return $notices; }