diff options
author | Zach Copley <zach@status.net> | 2010-03-11 23:43:03 +0000 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-03-11 23:43:03 +0000 |
commit | 212b20e876fac3b989cd79b1b896b88f50995a37 (patch) | |
tree | 9911fac8e7595e83b38ed791e4e23b818ab4adfe /actions/apitimelineuser.php | |
parent | 7e1a1506f5afd26da8dbe654f5f67f5c11d9d6e9 (diff) |
Add self link to user and group rss2 feeds
Diffstat (limited to 'actions/apitimelineuser.php')
-rw-r--r-- | actions/apitimelineuser.php | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/actions/apitimelineuser.php b/actions/apitimelineuser.php index 2d0047c04..5c4bcace4 100644 --- a/actions/apitimelineuser.php +++ b/actions/apitimelineuser.php @@ -116,13 +116,19 @@ class ApiTimelineUserAction extends ApiBareAuthAction // We'll use the shared params from the Atom stub // for other feed types. $atom = new AtomUserNoticeFeed($this->user); - $title = $atom->title; - $link = common_local_url( + + $link = common_local_url( 'showstream', array('nickname' => $this->user->nickname) ); - $subtitle = $atom->subtitle; - $logo = $atom->logo; + + // Calculate self link + $id = $this->arg('id'); + $aargs = array('format' => $this->format); + if (!empty($id)) { + $aargs['id'] = $id; + } + $self = $this->getSelfUri('ApiTimelineUser', $aargs); // FriendFeed's SUP protocol // Also added RSS and Atom feeds @@ -136,25 +142,22 @@ class ApiTimelineUserAction extends ApiBareAuthAction break; case 'rss': $this->showRssTimeline( - $this->notices, $title, $link, - $subtitle, $suplink, $logo + $this->notices, + $atom->title, + $link, + $atom->subtitle, + $suplink, + $atom->logo, + $self ); break; case 'atom': header('Content-Type: application/atom+xml; charset=utf-8'); - $id = $this->arg('id'); - $aargs = array('format' => 'atom'); - if (!empty($id)) { - $aargs['id'] = $id; - } - $self = $this->getSelfUri('ApiTimelineUser', $aargs); $atom->setId($self); $atom->setSelfLink($self); - $atom->addEntryFromNotices($this->notices); - $this->raw($atom->getString()); break; |