summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-03-11 23:28:41 +0000
committerZach Copley <zach@status.net>2010-03-11 23:28:41 +0000
commit7e1a1506f5afd26da8dbe654f5f67f5c11d9d6e9 (patch)
treea4cffd40a9240c195ec95ef114a1196bb2ed1e9b /lib
parent023f258b63c2c47b1af74811c39ab274b170e6b0 (diff)
Output self link in rss2 feeds, if available
Diffstat (limited to 'lib')
-rw-r--r--lib/apiaction.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/apiaction.php b/lib/apiaction.php
index fd09f3d42..73777f4e8 100644
--- a/lib/apiaction.php
+++ b/lib/apiaction.php
@@ -618,13 +618,25 @@ class ApiAction extends Action
$this->endDocument('xml');
}
- function showRssTimeline($notice, $title, $link, $subtitle, $suplink=null, $logo=null)
+ function showRssTimeline($notice, $title, $link, $subtitle, $suplink = null, $logo = null, $self = null)
{
$this->initDocument('rss');
$this->element('title', null, $title);
$this->element('link', null, $link);
+
+ if (!is_null($self)) {
+ $this->element(
+ 'atom:link',
+ array(
+ 'type' => 'application/rss+xml',
+ 'href' => $self,
+ 'rel' => 'self'
+ )
+ );
+ }
+
if (!is_null($suplink)) {
// For FriendFeed's SUP protocol
$this->element('link', array('xmlns' => 'http://www.w3.org/2005/Atom',