]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix feed links which were broken when the API was restructured
authorCraig Andrews <candrews@integralblue.com>
Thu, 29 Oct 2009 23:09:42 +0000 (19:09 -0400)
committerCraig Andrews <candrews@integralblue.com>
Thu, 29 Oct 2009 23:09:42 +0000 (19:09 -0400)
actions/all.php
actions/public.php
actions/replies.php
actions/showfavorites.php
actions/showgroup.php
actions/showstream.php
actions/tag.php

index f1786462e161e9d55cbadbb806a3362ee09269cb..61cedce7490cd08ed76d2568d85426179044242e 100644 (file)
@@ -99,19 +99,17 @@ class AllAction extends ProfileAction
                 sprintf(_('Feed for friends of %s (RSS 1.0)'), $this->user->nickname)),
             new Feed(Feed::RSS2,
                 common_local_url(
-                    'api', array(
-                        'apiaction' => 'statuses',
-                        'method' => 'friends_timeline',
-                        'argument' => $this->user->nickname.'.rss'
+                    'ApiTimelineFriends', array(
+                        'format' => 'rss',
+                        'id' => $this->user->nickname
                     )
                 ),
                 sprintf(_('Feed for friends of %s (RSS 2.0)'), $this->user->nickname)),
             new Feed(Feed::ATOM,
                 common_local_url(
-                    'api', array(
-                        'apiaction' => 'statuses',
-                        'method' => 'friends_timeline',
-                        'argument' => $this->user->nickname.'.atom'
+                    'ApiTimelineFriends', array(
+                        'format' => 'atom',
+                        'id' => $this->user->nickname
                     )
                 ),
                 sprintf(_('Feed for friends of %s (Atom)'), $this->user->nickname))
index 4b71e585328301f671199745792e27876f18ba43..982dfde15700863f6fff8da111a7f04376fdb070 100644 (file)
@@ -150,14 +150,12 @@ class PublicAction extends Action
         return array(new Feed(Feed::RSS1, common_local_url('publicrss'),
                               _('Public Stream Feed (RSS 1.0)')),
                      new Feed(Feed::RSS2,
-                              common_local_url('api',
-                                               array('apiaction' => 'statuses',
-                                                     'method' => 'public_timeline.rss')),
+                              common_local_url('ApiTimelinePublic',
+                                               array('format' => 'rss')),
                               _('Public Stream Feed (RSS 2.0)')),
                      new Feed(Feed::ATOM,
-                              common_local_url('api',
-                                               array('apiaction' => 'statuses',
-                                                     'method' => 'public_timeline.atom')),
+                              common_local_url('ApiTimelinePublic',
+                                               array('format' => 'atom')),
                               _('Public Stream Feed (Atom)')));
     }
 
index 6003ad30bde3e60b5a7fb5b9f953d20d1d634583..a13b5a22734934408c069ca26a4c8c00b1da5bf6 100644 (file)
@@ -138,11 +138,25 @@ class RepliesAction extends OwnerDesignAction
 
     function getFeeds()
     {
-        $rssurl   = common_local_url('repliesrss',
-                                     array('nickname' => $this->user->nickname));
-        $rsstitle = sprintf(_('Feed for replies to %s'), $this->user->nickname);
-
-        return array(new Feed(Feed::RSS1, $rssurl, $rsstitle));
+        return array(new Feed(Feed::RSS1,
+                              common_local_url('repliesrss',
+                                               array('nickname' => $this->user->nickname)),
+                              sprintf(_('Replies feed for %s (RSS 1.0)'),
+                                      $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)));
     }
 
     /**
index b96d2af37fc568a672132bba2a32280b488ecfc8..b12fcdd9a0c5e31e29da6db692ae99974d0fdc8a 100644 (file)
@@ -164,13 +164,25 @@ class ShowfavoritesAction extends OwnerDesignAction
 
     function getFeeds()
     {
-        $feedurl   = common_local_url('favoritesrss',
-                                      array('nickname' =>
-                                            $this->user->nickname));
-        $feedtitle = sprintf(_('Feed for favorites of %s'),
-                             $this->user->nickname);
-
-        return array(new Feed(Feed::RSS1, $feedurl, $feedtitle));
+        return array(new Feed(Feed::RSS1,
+                              common_local_url('favoritesrss',
+                                               array('nickname' => $this->user->nickname)),
+                              sprintf(_('Feed for favorites of %s (RSS 1.0)'),
+                                      $this->user->nickname)),
+                     new Feed(Feed::RSS2,
+                              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)));
     }
 
     /**
index bfe45ddad79a8d8194b679f510c058d7c2b68b71..a4af29391d0f7a7a7c38f2d673c9b4b6fc1afb0e 100644 (file)
@@ -328,17 +328,15 @@ class ShowgroupAction extends GroupDesignAction
                               sprintf(_('Notice feed for %s group (RSS 1.0)'),
                                       $this->group->nickname)),
                      new Feed(Feed::RSS2,
-                              common_local_url('api',
-                                               array('apiaction' => 'groups',
-                                                     'method' => 'timeline',
-                                                     'argument' => $this->group->nickname.'.rss')),
+                              common_local_url('ApiTimelineGroup',
+                                               array('format' => 'rss',
+                                                     'id' => $this->group->nickname)),
                               sprintf(_('Notice feed for %s group (RSS 2.0)'),
                                       $this->group->nickname)),
                      new Feed(Feed::ATOM,
-                              common_local_url('api',
-                                               array('apiaction' => 'groups',
-                                                     'method' => 'timeline',
-                                                     'argument' => $this->group->nickname.'.atom')),
+                              common_local_url('ApiTimelineGroup',
+                                               array('format' => 'atom',
+                                                     'id' => $this->group->nickname)),
                               sprintf(_('Notice feed for %s group (Atom)'),
                                       $this->group->nickname)),
                      new Feed(Feed::FOAF,
index de7100b1dcbc04e7246089cf2576b3cb654e66cd..4f480603785231de454e51f3c8856fb22a4537ef 100644 (file)
@@ -128,17 +128,17 @@ class ShowstreamAction extends ProfileAction
                               sprintf(_('Notice feed for %s (RSS 1.0)'),
                                       $this->user->nickname)),
                      new Feed(Feed::RSS2,
-                              common_local_url('api',
-                                               array('apiaction' => 'statuses',
-                                                     'method' => 'user_timeline',
-                                                     'argument' => $this->user->nickname.'.rss')),
+                              common_local_url('ApiTimelineUser',
+                                               array(
+                                                    'id' => $this->user->nickname,
+                                                    'format' => 'rss')),
                               sprintf(_('Notice feed for %s (RSS 2.0)'),
                                       $this->user->nickname)),
                      new Feed(Feed::ATOM,
-                              common_local_url('api',
-                                               array('apiaction' => 'statuses',
-                                                     'method' => 'user_timeline',
-                                                     'argument' => $this->user->nickname.'.atom')),
+                              common_local_url('ApiTimelineUser',
+                                               array(
+                                                    'id' => $this->user->nickname,
+                                                    'format' => 'atom')),
                               sprintf(_('Notice feed for %s (Atom)'),
                                       $this->user->nickname)),
                      new Feed(Feed::FOAF,
index f0ab30308cb3b5f2803b2e096189554677c3879f..3a88c1229dd217857bb386a787f66d89b14d436b 100644 (file)
@@ -86,17 +86,15 @@ class TagAction extends Action
                               sprintf(_('Notice feed for tag %s (RSS 1.0)'),
                                       $this->tag)),
                      new Feed(Feed::RSS2,   
-                              common_local_url('api',
-                                               array('apiaction' => 'tags',
-                                                     'method' => 'timeline',
-                                                     'argument' => $this->tag.'.rss')),
-                              sprintf(_('Notice feed for %s group (RSS 2.0)'),
+                              common_local_url('ApiTimelineTag',
+                                               array('format' => 'rss',
+                                                     'tag' => $this->tag)),
+                              sprintf(_('Notice feed for tag %s (RSS 2.0)'),
                                       $this->tag)),
                      new Feed(Feed::ATOM,
-                              common_local_url('api',
-                                               array('apiaction' => 'tags',
-                                                     'method' => 'timeline',
-                                                     'argument' => $this->tag.'.atom')),
+                              common_local_url('ApiTimelineTag',
+                                               array('format' => 'atom',
+                                                     'tag' => $this->tag)),
                               sprintf(_('Notice feed for tag %s (Atom)'),
                                       $this->tag)));
     }