diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-22 13:56:16 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-22 13:56:16 -0700 |
commit | e89908f26140c217e01b2f8f755712f38f3935f3 (patch) | |
tree | 6b241fc2e33f3528cf48b415ef67906826b02e24 /actions/apitimelinefriends.php | |
parent | 714d920faea302b55857cc3bec4e9e6160ea136a (diff) | |
parent | eb563937df921e5fc67ca0c87e229feb2907fd19 (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 1.0.x
Conflicts:
lib/channel.php
scripts/imdaemon.php
Diffstat (limited to 'actions/apitimelinefriends.php')
-rw-r--r-- | actions/apitimelinefriends.php | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/actions/apitimelinefriends.php b/actions/apitimelinefriends.php index 9ef3ace60..ac350ab1b 100644 --- a/actions/apitimelinefriends.php +++ b/actions/apitimelinefriends.php @@ -117,9 +117,17 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction $subtitle = sprintf( _('Updates from %1$s and friends on %2$s!'), - $this->user->nickname, $sitename + $this->user->nickname, + $sitename ); + $link = common_local_url( + 'all', + array('nickname' => $this->user->nickname) + ); + + $self = $this->getSelfUri(); + $logo = (!empty($avatar)) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE); @@ -130,19 +138,14 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction break; case 'rss': - $link = common_local_url( - 'all', array( - 'nickname' => $this->user->nickname - ) - ); - $this->showRssTimeline( $this->notices, $title, $link, $subtitle, null, - $logo + $logo, + $self ); break; case 'atom': @@ -156,24 +159,8 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction $atom->setSubtitle($subtitle); $atom->setLogo($logo); $atom->setUpdated('now'); - - $atom->addLink( - common_local_url( - 'all', - array('nickname' => $this->user->nickname) - ) - ); - - $id = $this->arg('id'); - $aargs = array('format' => 'atom'); - if (!empty($id)) { - $aargs['id'] = $id; - } - - $atom->addLink( - $this->getSelfUri('ApiTimelineFriends', $aargs), - array('rel' => 'self', 'type' => 'application/atom+xml') - ); + $atom->addLink($link); + $atom->setSelfLink($self); $atom->addEntryFromNotices($this->notices); |