From: Zach Copley Date: Thu, 11 Mar 2010 23:28:41 +0000 (+0000) Subject: Output self link in rss2 feeds, if available X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7e1a1506f5afd26da8dbe654f5f67f5c11d9d6e9;p=quix0rs-gnu-social.git Output self link in rss2 feeds, if available --- diff --git a/lib/apiaction.php b/lib/apiaction.php index fd09f3d426..73777f4e88 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',