]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/publicrss.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / actions / publicrss.php
index 7ad665e282fee3ee50c1745c24a11dee7151ffa8..85da8ed0c99263caf695d8309ce0c3663fa633e2 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();
     }
 
      /**
@@ -113,7 +85,7 @@ class PublicrssAction extends Rss10Action
         // nop
     }
 
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         return true;
     }