]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Output self link in rss2 feeds, if available
authorZach Copley <zach@status.net>
Thu, 11 Mar 2010 23:28:41 +0000 (23:28 +0000)
committerZach Copley <zach@status.net>
Thu, 11 Mar 2010 23:28:41 +0000 (23:28 +0000)
lib/apiaction.php

index fd09f3d426c27d13c1a144d67e15715c374bdc50..73777f4e8891182133277ff2e0a2296e9306e2e4 100644 (file)
@@ -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',