From 18ec8e3cc8ca3e18f87c1b892b68a0857be39597 Mon Sep 17 00:00:00 2001 From: Justin Kromlinger Date: Fri, 20 Nov 2020 00:19:15 +0100 Subject: [PATCH] RSS: Add ability to specify isPermaLink="false" for GUID --- web/lib/feedcreator.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/lib/feedcreator.class.php b/web/lib/feedcreator.class.php index a1fe24c9..bfc29b20 100644 --- a/web/lib/feedcreator.class.php +++ b/web/lib/feedcreator.class.php @@ -183,7 +183,7 @@ class FeedItem extends HtmlDescribable { /** * Optional attributes of an item. */ - var $author, $authorEmail, $image, $category, $comments, $guid, $source, $creator; + var $author, $authorEmail, $image, $category, $comments, $guid, $guidIsPermaLink, $source, $creator; /** * Publishing date of an item. May be in one of the following formats: @@ -995,7 +995,11 @@ class RSSCreator091 extends FeedCreator { $feed.= " ".htmlspecialchars($itemDate->rfc822())."\n"; } if ($this->items[$i]->guid!="") { - $feed.= " ".htmlspecialchars($this->items[$i]->guid)."\n"; + $feed.= " items[$i]->guidIsPermaLink == false) { + $feed.= " isPermaLink=\"false\""; + } + $feed.= ">".htmlspecialchars($this->items[$i]->guid)."\n"; } $feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " "); $feed.= " \n";