X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Frssaction.php;h=faf6bec7dec4618d8ebc4888c4e55353f8aff99a;hb=150cf8c045e8e091a70440d1b833fa19aaf31419;hp=dd0f1005af3ce4eea0433fd38a69521b6223c66e;hpb=8284b3cb82f4dec6e0f2bf74dea6e1a3bc7f4eac;p=quix0rs-gnu-social.git diff --git a/lib/rssaction.php b/lib/rssaction.php index dd0f1005af..faf6bec7de 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -78,25 +78,12 @@ class Rss10Action extends Action function prepare($args) { parent::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 handling, including cache check - parent::handle($args); if (common_config('site', 'private')) { if (!isset($_SERVER['PHP_AUTH_USER'])) { @@ -122,8 +109,21 @@ class Rss10Action extends Action } } - // Get the list of notices - $this->notices = $this->getNotices($this->limit); + return true; + } + + /** + * Handle a request + * + * @param array $args Arguments from $_REQUEST + * + * @return void + */ + + function handle($args) + { + // Parent handling, including cache check + parent::handle($args); $this->showRss(); } @@ -140,7 +140,7 @@ class Rss10Action extends Action } /** - * Get the notices to output in this stream + * Get the notices to output in this stream. * * @return array an array of Notice objects sorted in reverse chron */