]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/publicrss.php
Merge branch 'group-join-approve-reject-button-icons' into 'nightly'
[quix0rs-gnu-social.git] / actions / publicrss.php
index 7ad665e282fee3ee50c1745c24a11dee7151ffa8..5dcff3ba3d2f973c11118c90ae7e20c7ad9c1678 100644 (file)
@@ -44,29 +44,6 @@ if (!defined('GNUSOCIAL')) { exit(1); }
  */
 class PublicrssAction extends Rss10Action
 {
-    /**
-     * Read arguments and initialize members
-     *
-     * @param array $args Arguments from $_REQUEST
-     * @return boolean success
-     */
-    function prepare($args)
-    {
-        parent::prepare($args);
-        $this->notices = $this->getNotices($this->limit);
-        return true;
-    }
-
-    /**
-     * Initialization.
-     *
-     * @return boolean true
-     */
-    function init()
-    {
-        return true;
-    }
-
     /**
      * Get notices
      *
@@ -74,15 +51,10 @@ class PublicrssAction extends Rss10Action
      *
      * @return array notices
      */
-    function getNotices($limit=0)
+    protected function getNotices()
     {
-        $notices = array();
-        $notice  = Notice::publicStream(0, ($limit == 0) ? 48 : $limit);
-        while ($notice->fetch()) {
-            $notices[] = clone($notice);
-        }
-
-        return $notices;
+        $stream  = Notice::publicStream(0, $this->limit);
+        return $stream->fetchAll();
     }
 
      /**