summaryrefslogtreecommitdiff
path: root/actions/apitimelineuser.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-26 09:35:28 -0800
committerBrion Vibber <brion@pobox.com>2010-02-26 09:35:28 -0800
commit8dfc8f1635940b096e7f4025e3aef0ca4f909eb2 (patch)
tree9fce4aa765d56496031698f219da2f0f82b33e80 /actions/apitimelineuser.php
parent8914b69d5055c1bc7d0604ee338ffdaf6b0a8606 (diff)
parentb331e971b055386a126aaec27d661f26ba3b813c (diff)
Merge branch 'testing' into 0.9.x
Diffstat (limited to 'actions/apitimelineuser.php')
-rw-r--r--actions/apitimelineuser.php19
1 files changed, 4 insertions, 15 deletions
diff --git a/actions/apitimelineuser.php b/actions/apitimelineuser.php
index 3e849cc78..b3ded97c0 100644
--- a/actions/apitimelineuser.php
+++ b/actions/apitimelineuser.php
@@ -116,8 +116,6 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$sitename = common_config('site', 'name');
$title = sprintf(_("%s timeline"), $this->user->nickname);
- $taguribase = TagURI::base();
- $id = "tag:$taguribase:UserTimeline:" . $this->user->id;
$link = common_local_url(
'showstream',
array('nickname' => $this->user->nickname)
@@ -148,21 +146,10 @@ class ApiTimelineUserAction extends ApiBareAuthAction
header('Content-Type: application/atom+xml; charset=utf-8');
- // If this was called using an integer ID, i.e.: using the canonical
- // URL for this user's feed, then pass the User object into the feed,
- // so the OStatus plugin, and possibly other plugins, can access it.
- // Feels sorta hacky. -- Z
+ // @todo set all this Atom junk up inside the feed class
- $atom = null;
- $id = $this->arg('id');
-
- if (strval(intval($id)) === strval($id)) {
- $atom = new AtomUserNoticeFeed($this->user);
- } else {
- $atom = new AtomUserNoticeFeed();
- }
+ $atom = new AtomUserNoticeFeed($this->user);
- $atom->setId($id);
$atom->setTitle($title);
$atom->setSubtitle($subtitle);
$atom->setLogo($logo);
@@ -181,6 +168,8 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$aargs['id'] = $id;
}
+ $atom->setId($this->getSelfUri('ApiTimelineUser', $aargs));
+
$atom->addLink(
$this->getSelfUri('ApiTimelineUser', $aargs),
array('rel' => 'self', 'type' => 'application/atom+xml')