X-Git-Url: https://git.mxchange.org/?p=quix0rs-gnu-social.git;a=blobdiff_plain;f=actions%2Fpublicrss.php;fp=actions%2Fpublicrss.php;h=85da8ed0c99263caf695d8309ce0c3663fa633e2;hp=ee127b51aca1ddcaa0d0c03bf5317c1c5ba4ede8;hb=4160a3fb730113f3d712bd777884c4b0482f6df1;hpb=abd90bbdf562614755802885dfb5673645df8575 diff --git a/actions/publicrss.php b/actions/publicrss.php index ee127b51ac..85da8ed0c9 100644 --- a/actions/publicrss.php +++ b/actions/publicrss.php @@ -28,11 +28,7 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { - exit(1); -} - -require_once INSTALLDIR.'/lib/rssaction.php'; +if (!defined('GNUSOCIAL')) { exit(1); } /** * RSS feed for public timeline. @@ -48,29 +44,6 @@ require_once INSTALLDIR.'/lib/rssaction.php'; */ class PublicrssAction extends Rss10Action { - /** - * Read arguments and initialize members - * - * @param array $args Arguments from $_REQUEST - * @return boolean success - */ - function prepare(array $args=array()) - { - parent::prepare($args); - $this->notices = $this->getNotices($this->limit); - return true; - } - - /** - * Initialization. - * - * @return boolean true - */ - function init() - { - return true; - } - /** * Get notices * @@ -78,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(); } /**