From 97c98cf59ace088e487e130182ff4dc99d2d408b Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 17 Jan 2009 22:30:44 +0000 Subject: Break up settings into two tabset Made two tabsets: account and connect. Removed "Invite" from the global nav to make room. --- lib/rssaction.php | 97 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 76 insertions(+), 21 deletions(-) (limited to 'lib/rssaction.php') diff --git a/lib/rssaction.php b/lib/rssaction.php index 9564cfb46..2c532912b 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -1,9 +1,12 @@ . + * + * @category Mail + * @package Laconica + * @author Evan Prodromou + * @author Earle Martin + * @copyright 2008-9 Control Yourself, Inc. + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ */ if (!defined('LACONICA')) { exit(1); } @@ -23,35 +34,84 @@ define('DEFAULT_RSS_LIMIT', 48); class Rss10Action extends Action { - # This will contain the details of each feed item's author and be used to generate SIOC data. + var $creators = array(); + var $limit = DEFAULT_RSS_LIMIT; + + /** + * Constructor + * + * Just wraps the Action constructor. + * + * @param string $output URI to output to, default = stdout + * @param boolean $indent Whether to indent output, default true + * + * @see Action::__construct + */ - function is_readonly() + function __construct($output='php://output', $indent=true) + { + parent::__construct($output, $indent); + } + + /** + * Do we need to write to the database? + * + * @return boolean true + */ + + function isReadonly() { return true; } + /** + * Read arguments and initialize members + * + * @param array $args Arguments from $_REQUEST + * @return boolean success + */ + + function prepare($args) + { + $this->limit = (int) $this->trimmed('limit'); + if ($this->limit == 0) { + $this->limit = DEFAULT_RSS_LIMIT; + } + return true; + } + + /** + * Handle a request + * + * @param array $args Arguments from $_REQUEST + * + * @return void + */ + function handle($args) { parent::handle($args); - $limit = (int) $this->trimmed('limit'); - if ($limit == 0) { - $limit = DEFAULT_RSS_LIMIT; - } $this->show_rss($limit); } - function init() - { - return true; - } - - function get_notices() + /** + * Get the notices to output in this stream + * + * @return array an array of Notice objects sorted in reverse chron + */ + + function getNotices() { return array(); } + /** + * Get a description of the channel + * + * Returns an array with the following + * @return array function get_channel() { return array('url' => '', @@ -67,11 +127,6 @@ class Rss10Action extends Action function show_rss($limit=0) { - - if (!$this->init()) { - return; - } - $notices = $this->get_notices($limit); $this->init_rss(); -- cgit v1.2.3-54-g00ecf