]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/publicrss.php
remove 'nudge' -- it won't be in this release
[quix0rs-gnu-social.git] / actions / publicrss.php
index 621058d3fe7668c5d887e85dc13266c055e3c2f9..1ab6a8be06aa4214397ce5844a5d536e23fed535 100644 (file)
@@ -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, 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;
        }