diff options
author | Zach Copley <zach@status.net> | 2010-02-15 21:14:32 +0000 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-02-15 21:14:32 +0000 |
commit | 5db40c440dcfa3f9d19f047c003bbcfaeb69dbc9 (patch) | |
tree | a6b86448b61ddeecfc0abdc5a13f1eca5723a3e1 /actions/apitimelinementions.php | |
parent | 5cc1f8b001057e9c4301b173391a7f0a5415f153 (diff) | |
parent | f5c69dfbf946438fbe1f472de3adb4514db8d090 (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'actions/apitimelinementions.php')
-rw-r--r-- | actions/apitimelinementions.php | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/actions/apitimelinementions.php b/actions/apitimelinementions.php index 9dc2162cc..d2e31d0bd 100644 --- a/actions/apitimelinementions.php +++ b/actions/apitimelinementions.php @@ -137,12 +137,36 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction $this->showRssTimeline($this->notices, $title, $link, $subtitle, null, $logo); break; case 'atom': - $selfuri = common_root_url() . - ltrim($_SERVER['QUERY_STRING'], 'p='); - $this->showAtomTimeline( - $this->notices, $title, $id, $link, $subtitle, - null, $selfuri, $logo + + $atom = new AtomNoticeFeed(); + + $atom->setId($id); + $atom->setTitle($title); + $atom->setSubtitle($subtitle); + $atom->setLogo($logo); + $atom->setUpdated('now'); + + $atom->addLink( + common_local_url( + 'replies', + array('nickname' => $this->user->nickname) + ) + ); + + $id = $this->arg('id'); + $aargs = array('format' => 'atom'); + if (!empty($id)) { + $aargs['id'] = $id; + } + + $atom->addLink( + $this->getSelfUri('ApiTimelineMentions', $aargs), + array('rel' => 'self', 'type' => 'application/atom+xml') ); + + $atom->addEntryFromNotices($this->notices); + $this->raw($atom->getString()); + break; case 'json': $this->showJsonTimeline($this->notices); |