diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-12 09:41:49 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-12 09:41:49 -0800 |
commit | f72eb17304af9c2d7dac8a34b07bd2433b79c8c4 (patch) | |
tree | 3862aab32eae74edba8fa1b2aa9a62288c544af4 /actions/apitimelinepublic.php | |
parent | f3066c80d3c55dd0dbf8315674a76e4d2adbe49a (diff) | |
parent | 3dc84dd02d5558b7e2e9de903eac04edcd73aec7 (diff) |
Merge commit 'origin/testing' into 0.9.x
Diffstat (limited to 'actions/apitimelinepublic.php')
-rw-r--r-- | actions/apitimelinepublic.php | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/actions/apitimelinepublic.php b/actions/apitimelinepublic.php index 3e4dad690..903461425 100644 --- a/actions/apitimelinepublic.php +++ b/actions/apitimelinepublic.php @@ -107,7 +107,8 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction $title = sprintf(_("%s public timeline"), $sitename); $taguribase = TagURI::base(); $id = "tag:$taguribase:PublicTimeline"; - $link = common_root_url(); + $link = common_local_url('public'); + $self = $this->getSelfUri(); $subtitle = sprintf(_("%s updates from everyone!"), $sitename); switch($this->format) { @@ -115,10 +116,20 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction $this->showXmlTimeline($this->notices); break; case 'rss': - $this->showRssTimeline($this->notices, $title, $link, $subtitle, null, $sitelogo); + $this->showRssTimeline( + $this->notices, + $title, + $link, + $subtitle, + null, + $sitelogo, + $self + ); break; case 'atom': + header('Content-Type: application/atom+xml; charset=utf-8'); + $atom = new AtomNoticeFeed(); $atom->setId($id); @@ -126,16 +137,8 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction $atom->setSubtitle($subtitle); $atom->setLogo($sitelogo); $atom->setUpdated('now'); - $atom->addLink(common_local_url('public')); - - $atom->addLink( - $this->getSelfUri( - 'ApiTimelinePublic', array('format' => 'atom') - ), - array('rel' => 'self', 'type' => 'application/atom+xml') - ); - + $atom->setSelfLink($self); $atom->addEntryFromNotices($this->notices); $this->raw($atom->getString()); |