summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/apitimelineuser.php39
1 files changed, 36 insertions, 3 deletions
diff --git a/actions/apitimelineuser.php b/actions/apitimelineuser.php
index ed9104905..bcc48f59c 100644
--- a/actions/apitimelineuser.php
+++ b/actions/apitimelineuser.php
@@ -145,7 +145,26 @@ class ApiTimelineUserAction extends ApiBareAuthAction
);
break;
case 'atom':
+
+ header('Content-Type: application/atom+xml; charset=utf-8');
+
+ $atom = new AtomNoticeFeed();
+
+ $atom->addLink(
+ common_local_url(
+ 'showstream',
+ array('nickname' => $this->user->nickname)
+ )
+ );
+
+ $atom->setId($id);
+ $atom->setTitle($title);
+ $atom->setSubtitle($subtitle);
+ $atom->setLogo($logo);
+ $atom->setUpdated('now');
+
$id = $this->arg('id');
+
if ($id) {
$selfuri = common_root_url() .
'api/statuses/user_timeline/' .
@@ -154,10 +173,24 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$selfuri = common_root_url() .
'api/statuses/user_timeline.atom';
}
- $this->showAtomTimeline(
- $this->notices, $title, $id, $link,
- $subtitle, $suplink, $selfuri, $logo
+
+ $atom->addLink(
+ $selfuri,
+ array('rel' => 'self', 'type' => 'application/atom+xml')
+ );
+
+ $atom->addLink(
+ $suplink,
+ array(
+ 'rel' => 'http://api.friendfeed.com/2008/03#sup',
+ 'type' => 'application/json'
+ )
);
+
+ $atom->addEntryFromNotices($this->notices);
+
+ print $atom->getString();
+
break;
case 'json':
$this->showJsonTimeline($this->notices);