forked from GNUsocial/gnu-social
Fix feed links which were broken when the API was restructured
This commit is contained in:
parent
de7c12baef
commit
35ace5562d
@ -99,19 +99,17 @@ class AllAction extends ProfileAction
|
|||||||
sprintf(_('Feed for friends of %s (RSS 1.0)'), $this->user->nickname)),
|
sprintf(_('Feed for friends of %s (RSS 1.0)'), $this->user->nickname)),
|
||||||
new Feed(Feed::RSS2,
|
new Feed(Feed::RSS2,
|
||||||
common_local_url(
|
common_local_url(
|
||||||
'api', array(
|
'ApiTimelineFriends', array(
|
||||||
'apiaction' => 'statuses',
|
'format' => 'rss',
|
||||||
'method' => 'friends_timeline',
|
'id' => $this->user->nickname
|
||||||
'argument' => $this->user->nickname.'.rss'
|
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
sprintf(_('Feed for friends of %s (RSS 2.0)'), $this->user->nickname)),
|
sprintf(_('Feed for friends of %s (RSS 2.0)'), $this->user->nickname)),
|
||||||
new Feed(Feed::ATOM,
|
new Feed(Feed::ATOM,
|
||||||
common_local_url(
|
common_local_url(
|
||||||
'api', array(
|
'ApiTimelineFriends', array(
|
||||||
'apiaction' => 'statuses',
|
'format' => 'atom',
|
||||||
'method' => 'friends_timeline',
|
'id' => $this->user->nickname
|
||||||
'argument' => $this->user->nickname.'.atom'
|
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
sprintf(_('Feed for friends of %s (Atom)'), $this->user->nickname))
|
sprintf(_('Feed for friends of %s (Atom)'), $this->user->nickname))
|
||||||
|
@ -150,14 +150,12 @@ class PublicAction extends Action
|
|||||||
return array(new Feed(Feed::RSS1, common_local_url('publicrss'),
|
return array(new Feed(Feed::RSS1, common_local_url('publicrss'),
|
||||||
_('Public Stream Feed (RSS 1.0)')),
|
_('Public Stream Feed (RSS 1.0)')),
|
||||||
new Feed(Feed::RSS2,
|
new Feed(Feed::RSS2,
|
||||||
common_local_url('api',
|
common_local_url('ApiTimelinePublic',
|
||||||
array('apiaction' => 'statuses',
|
array('format' => 'rss')),
|
||||||
'method' => 'public_timeline.rss')),
|
|
||||||
_('Public Stream Feed (RSS 2.0)')),
|
_('Public Stream Feed (RSS 2.0)')),
|
||||||
new Feed(Feed::ATOM,
|
new Feed(Feed::ATOM,
|
||||||
common_local_url('api',
|
common_local_url('ApiTimelinePublic',
|
||||||
array('apiaction' => 'statuses',
|
array('format' => 'atom')),
|
||||||
'method' => 'public_timeline.atom')),
|
|
||||||
_('Public Stream Feed (Atom)')));
|
_('Public Stream Feed (Atom)')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,11 +138,25 @@ class RepliesAction extends OwnerDesignAction
|
|||||||
|
|
||||||
function getFeeds()
|
function getFeeds()
|
||||||
{
|
{
|
||||||
$rssurl = common_local_url('repliesrss',
|
return array(new Feed(Feed::RSS1,
|
||||||
array('nickname' => $this->user->nickname));
|
common_local_url('repliesrss',
|
||||||
$rsstitle = sprintf(_('Feed for replies to %s'), $this->user->nickname);
|
array('nickname' => $this->user->nickname)),
|
||||||
|
sprintf(_('Replies feed for %s (RSS 1.0)'),
|
||||||
return array(new Feed(Feed::RSS1, $rssurl, $rsstitle));
|
$this->user->nickname)),
|
||||||
|
new Feed(Feed::RSS2,
|
||||||
|
common_local_url('ApiTimelineMentions',
|
||||||
|
array(
|
||||||
|
'id' => $this->user->nickname,
|
||||||
|
'format' => 'rss')),
|
||||||
|
sprintf(_('Replies feed for %s (RSS 2.0)'),
|
||||||
|
$this->user->nickname)),
|
||||||
|
new Feed(Feed::ATOM,
|
||||||
|
common_local_url('ApiTimelineMentions',
|
||||||
|
array(
|
||||||
|
'id' => $this->user->nickname,
|
||||||
|
'format' => 'atom')),
|
||||||
|
sprintf(_('Replies feed for %s (Atom)'),
|
||||||
|
$this->user->nickname)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -164,13 +164,25 @@ class ShowfavoritesAction extends OwnerDesignAction
|
|||||||
|
|
||||||
function getFeeds()
|
function getFeeds()
|
||||||
{
|
{
|
||||||
$feedurl = common_local_url('favoritesrss',
|
return array(new Feed(Feed::RSS1,
|
||||||
array('nickname' =>
|
common_local_url('favoritesrss',
|
||||||
$this->user->nickname));
|
array('nickname' => $this->user->nickname)),
|
||||||
$feedtitle = sprintf(_('Feed for favorites of %s'),
|
sprintf(_('Feed for favorites of %s (RSS 1.0)'),
|
||||||
$this->user->nickname);
|
$this->user->nickname)),
|
||||||
|
new Feed(Feed::RSS2,
|
||||||
return array(new Feed(Feed::RSS1, $feedurl, $feedtitle));
|
common_local_url('ApiTimelineFavorites',
|
||||||
|
array(
|
||||||
|
'id' => $this->user->nickname,
|
||||||
|
'format' => 'rss')),
|
||||||
|
sprintf(_('Feed for favorites of %s (RSS 2.0)'),
|
||||||
|
$this->user->nickname)),
|
||||||
|
new Feed(Feed::ATOM,
|
||||||
|
common_local_url('ApiTimelineFavorites',
|
||||||
|
array(
|
||||||
|
'id' => $this->user->nickname,
|
||||||
|
'format' => 'atom')),
|
||||||
|
sprintf(_('Feed for favorites of %s (Atom)'),
|
||||||
|
$this->user->nickname)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -328,17 +328,15 @@ class ShowgroupAction extends GroupDesignAction
|
|||||||
sprintf(_('Notice feed for %s group (RSS 1.0)'),
|
sprintf(_('Notice feed for %s group (RSS 1.0)'),
|
||||||
$this->group->nickname)),
|
$this->group->nickname)),
|
||||||
new Feed(Feed::RSS2,
|
new Feed(Feed::RSS2,
|
||||||
common_local_url('api',
|
common_local_url('ApiTimelineGroup',
|
||||||
array('apiaction' => 'groups',
|
array('format' => 'rss',
|
||||||
'method' => 'timeline',
|
'id' => $this->group->nickname)),
|
||||||
'argument' => $this->group->nickname.'.rss')),
|
|
||||||
sprintf(_('Notice feed for %s group (RSS 2.0)'),
|
sprintf(_('Notice feed for %s group (RSS 2.0)'),
|
||||||
$this->group->nickname)),
|
$this->group->nickname)),
|
||||||
new Feed(Feed::ATOM,
|
new Feed(Feed::ATOM,
|
||||||
common_local_url('api',
|
common_local_url('ApiTimelineGroup',
|
||||||
array('apiaction' => 'groups',
|
array('format' => 'atom',
|
||||||
'method' => 'timeline',
|
'id' => $this->group->nickname)),
|
||||||
'argument' => $this->group->nickname.'.atom')),
|
|
||||||
sprintf(_('Notice feed for %s group (Atom)'),
|
sprintf(_('Notice feed for %s group (Atom)'),
|
||||||
$this->group->nickname)),
|
$this->group->nickname)),
|
||||||
new Feed(Feed::FOAF,
|
new Feed(Feed::FOAF,
|
||||||
|
@ -128,17 +128,17 @@ class ShowstreamAction extends ProfileAction
|
|||||||
sprintf(_('Notice feed for %s (RSS 1.0)'),
|
sprintf(_('Notice feed for %s (RSS 1.0)'),
|
||||||
$this->user->nickname)),
|
$this->user->nickname)),
|
||||||
new Feed(Feed::RSS2,
|
new Feed(Feed::RSS2,
|
||||||
common_local_url('api',
|
common_local_url('ApiTimelineUser',
|
||||||
array('apiaction' => 'statuses',
|
array(
|
||||||
'method' => 'user_timeline',
|
'id' => $this->user->nickname,
|
||||||
'argument' => $this->user->nickname.'.rss')),
|
'format' => 'rss')),
|
||||||
sprintf(_('Notice feed for %s (RSS 2.0)'),
|
sprintf(_('Notice feed for %s (RSS 2.0)'),
|
||||||
$this->user->nickname)),
|
$this->user->nickname)),
|
||||||
new Feed(Feed::ATOM,
|
new Feed(Feed::ATOM,
|
||||||
common_local_url('api',
|
common_local_url('ApiTimelineUser',
|
||||||
array('apiaction' => 'statuses',
|
array(
|
||||||
'method' => 'user_timeline',
|
'id' => $this->user->nickname,
|
||||||
'argument' => $this->user->nickname.'.atom')),
|
'format' => 'atom')),
|
||||||
sprintf(_('Notice feed for %s (Atom)'),
|
sprintf(_('Notice feed for %s (Atom)'),
|
||||||
$this->user->nickname)),
|
$this->user->nickname)),
|
||||||
new Feed(Feed::FOAF,
|
new Feed(Feed::FOAF,
|
||||||
|
@ -86,17 +86,15 @@ class TagAction extends Action
|
|||||||
sprintf(_('Notice feed for tag %s (RSS 1.0)'),
|
sprintf(_('Notice feed for tag %s (RSS 1.0)'),
|
||||||
$this->tag)),
|
$this->tag)),
|
||||||
new Feed(Feed::RSS2,
|
new Feed(Feed::RSS2,
|
||||||
common_local_url('api',
|
common_local_url('ApiTimelineTag',
|
||||||
array('apiaction' => 'tags',
|
array('format' => 'rss',
|
||||||
'method' => 'timeline',
|
'tag' => $this->tag)),
|
||||||
'argument' => $this->tag.'.rss')),
|
sprintf(_('Notice feed for tag %s (RSS 2.0)'),
|
||||||
sprintf(_('Notice feed for %s group (RSS 2.0)'),
|
|
||||||
$this->tag)),
|
$this->tag)),
|
||||||
new Feed(Feed::ATOM,
|
new Feed(Feed::ATOM,
|
||||||
common_local_url('api',
|
common_local_url('ApiTimelineTag',
|
||||||
array('apiaction' => 'tags',
|
array('format' => 'atom',
|
||||||
'method' => 'timeline',
|
'tag' => $this->tag)),
|
||||||
'argument' => $this->tag.'.atom')),
|
|
||||||
sprintf(_('Notice feed for tag %s (Atom)'),
|
sprintf(_('Notice feed for tag %s (Atom)'),
|
||||||
$this->tag)));
|
$this->tag)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user