X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fshowfavorites.php;h=a1a2dabb3877ef3a23359ee405a1bbc57c979453;hb=0cd93c276136f849070b05965cf681734f7b9f09;hp=67ee914a914a7283b83076b4e31cb8bc816641d7;hpb=55b4303ea4da2a74723f7df5dbd1d83ae3922d27;p=quix0rs-gnu-social.git diff --git a/actions/showfavorites.php b/actions/showfavorites.php index 67ee914a91..a1a2dabb38 100644 --- a/actions/showfavorites.php +++ b/actions/showfavorites.php @@ -22,7 +22,7 @@ * @category Personal * @package StatusNet * @author Evan Prodromou - * @copyright 2008-2009 StatusNet, Inc. + * @copyright 2008-2011 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -44,7 +44,7 @@ require_once INSTALLDIR.'/lib/feedlist.php'; * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ -class ShowfavoritesAction extends OwnerDesignAction +class ShowfavoritesAction extends Action { /** User we're getting the faves of */ var $user = null; @@ -99,7 +99,7 @@ class ShowfavoritesAction extends OwnerDesignAction $nickname = common_canonical_nickname($this->arg('nickname')); - $this->user = User::staticGet('nickname', $nickname); + $this->user = User::getKV('nickname', $nickname); if (!$this->user) { // TRANS: Client error displayed when trying to display favourite notices for a non-existing user. @@ -165,7 +165,15 @@ class ShowfavoritesAction extends OwnerDesignAction */ function getFeeds() { - return array(new Feed(Feed::RSS1, + return array(new Feed(Feed::JSON, + common_local_url('ApiTimelineFavorites', + array( + 'id' => $this->user->nickname, + 'format' => 'as')), + // TRANS: Feed link text. %s is a username. + sprintf(_('Feed for favorites of %s (Activity Streams JSON)'), + $this->user->nickname)), + new Feed(Feed::RSS1, common_local_url('favoritesrss', array('nickname' => $this->user->nickname)), // TRANS: Feed link text. %s is a username.