class TagrssAction extends Rss10Action
{
+ var $tag;
- function init()
- {
- $tag = $this->trimmed('tag');
+ function prepare($args) {
+ parent::prepare($args);
+ $tag = common_canonical_tag($this->trimmed('tag'));
$this->tag = Notice_tag::staticGet('tag', $tag);
-
if (!$this->tag) {
$this->clientError(_('No such tag.'));
return false;
}
}
- function get_notices($limit=0)
+ function getNotices($limit=0)
{
$tag = $this->tag;
}
$notice = Notice_tag::getStream($tag->tag, 0, ($limit == 0) ? NOTICES_PER_PAGE : $limit);
-
while ($notice->fetch()) {
$notices[] = clone($notice);
}
return $notices;
}
- function get_channel()
+ function getChannel()
{
- $tag = $this->tag->tag;
-
+ $tagname = $this->tag->tag;
$c = array('url' => common_local_url('tagrss', array('tag' => $tagname)),
'title' => $tagname,
'link' => common_local_url('tagrss', array('tag' => $tagname)),
return common_path("api/statuses/public_timeline.atom");
case 'publicxrds':
return common_path('xrds');
+ case 'tagrss':
+ return common_path('tag/' . $args['tag'] . '/rss');
case 'featuredrss':
return common_path('featuredrss');
case 'favoritedrss':