X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpublicrss.php;h=1ab6a8be06aa4214397ce5844a5d536e23fed535;hb=2abe10b8ea4b5d69fc7f6513bf465541454ca2cf;hp=0916da00913062c8a03d881c12f92631fbc02558;hpb=87b494f1ebbe7640d194ef322af12fdf378295df;p=quix0rs-gnu-social.git diff --git a/actions/publicrss.php b/actions/publicrss.php index 0916da0091..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 = DB_DataObject::factory('notice'); - - # FIXME: bad performance - - $notice->whereAdd('EXISTS (SELECT user.id from user where user.id = notice.profile_id)'); - - $notice->orderBy('created 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; }