summaryrefslogtreecommitdiff
path: root/actions/apitimelineretweetsofme.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2010-02-16 10:25:57 -0500
committerCraig Andrews <candrews@integralblue.com>2010-02-16 10:25:57 -0500
commit32084e33a266797b306158df29e48f057651b410 (patch)
tree2a46e529783c8547aaae8ac00c8cac9bdfa61490 /actions/apitimelineretweetsofme.php
parent057ec1fceacbfec1f755a5bc6700a188aa70e33f (diff)
parentd4f6235d7b8a40bd1b51370e7eb405cdb14e61fb (diff)
Merge branch '0.9.x' into 1.0.x
Conflicts: lib/queuemanager.php
Diffstat (limited to 'actions/apitimelineretweetsofme.php')
-rw-r--r--actions/apitimelineretweetsofme.php36
1 files changed, 33 insertions, 3 deletions
diff --git a/actions/apitimelineretweetsofme.php b/actions/apitimelineretweetsofme.php
index e4b09e9bd..26706a75e 100644
--- a/actions/apitimelineretweetsofme.php
+++ b/actions/apitimelineretweetsofme.php
@@ -99,6 +99,8 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
$strm = $this->auth_user->repeatsOfMe($offset, $limit, $this->since_id, $this->max_id);
+ common_debug(var_export($strm, true));
+
switch ($this->format) {
case 'xml':
$this->showXmlTimeline($strm);
@@ -112,10 +114,38 @@ class ApiTimelineRetweetsOfMeAction extends ApiAuthAction
$title = sprintf(_("Repeats of %s"), $this->auth_user->nickname);
$taguribase = common_config('integration', 'taguri');
$id = "tag:$taguribase:RepeatsOfMe:" . $this->auth_user->id;
- $link = common_local_url('showstream',
- array('nickname' => $this->auth_user->nickname));
- $this->showAtomTimeline($strm, $title, $id, $link);
+ header('Content-Type: application/atom+xml; charset=utf-8');
+
+ $atom = new AtomNoticeFeed();
+
+ $atom->setId($id);
+ $atom->setTitle($title);
+ $atom->setSubtitle($subtitle);
+ $atom->setUpdated('now');
+
+ $atom->addLink(
+ common_local_url(
+ 'showstream',
+ array('nickname' => $this->auth_user->nickname)
+ )
+ );
+
+ $id = $this->arg('id');
+ $aargs = array('format' => 'atom');
+ if (!empty($id)) {
+ $aargs['id'] = $id;
+ }
+
+ $atom->addLink(
+ $this->getSelfUri('ApiTimelineRetweetsOfMe', $aargs),
+ array('rel' => 'self', 'type' => 'application/atom+xml')
+ );
+
+ $atom->addEntryFromNotices($strm);
+
+ $this->raw($atom->getString());
+
break;
default: