class TagAction extends Action
{
var $notice;
+ var $tag;
+ var $page;
function prepare($args)
{
if (!$this->tag) {
common_redirect(common_local_url('publictagcloud'), 301);
- return false;
}
if ($this->tag != $taginput) {
- common_redirect(common_local_url('tag', array('tag' => $this->tag)),
- 301);
- return false;
+ common_redirect(common_local_url('tag', array('tag' => $this->tag)), 301);
}
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
return true;
}
- function showSections()
- {
- $pop = new PopularNoticeSection($this);
- $pop->show();
- }
-
function title()
{
if ($this->page == 1) {
function getFeeds()
{
- return array(new Feed(Feed::RSS1,
+ return array(new Feed(Feed::JSON,
+ common_local_url('ApiTimelineTag',
+ array('format' => 'as',
+ 'tag' => $this->tag)),
+ // TRANS: Link label for feed on "notices with tag" page.
+ // TRANS: %s is the tag the feed is for.
+ sprintf(_('Notice feed for tag %s (Activity Streams JSON)'),
+ $this->tag)),
+ new Feed(Feed::RSS1,
common_local_url('tagrss',
array('tag' => $this->tag)),
// TRANS: Link label for feed on "notices with tag" page.