From 3037af3a80246870284e7c1ab52f407a081f5ffd Mon Sep 17 00:00:00 2001
From: Thomas Lange <code@nerdmind.de>
Date: Sat, 24 Jul 2021 21:53:10 +0200
Subject: Create feed item's GUID manually in template file

Do not rely on the "$POST['GUID']" template parameter anymore and create
the GUID for the feed item manually in the feed item's template file.

The application internal function "generatePseudoGUID" has been removed
and the function "generateItemTemplateData" will not return the "GUID"
part anymore (which was only used by the feed item template anyway).

For backward compatibility, the "$POST['GUID']" template parameter will
still be present in the feed item template, but not in other templates!
---
 theme/default/html/feed/item.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'theme/default/html/feed/item.php')

diff --git a/theme/default/html/feed/item.php b/theme/default/html/feed/item.php
index 0bf23fc..088aa34 100644
--- a/theme/default/html/feed/item.php
+++ b/theme/default/html/feed/item.php
@@ -12,7 +12,7 @@ $HTML = $POST['BODY']['HTML']();
 <item>
 	<title><?=escapeHTML($POST['ATTR']['NAME'])?></title>
 	<link><?=$POST['URL']?></link>
-	<guid isPermaLink="false"><?=$POST['GUID']?></guid>
+	<guid isPermaLink="false"><?=sha1($POST['ATTR']['ID'].$POST['ATTR']['TIME_INSERT']);?></guid>
 	<pubDate><?=parseDatetime($POST['ATTR']['TIME_INSERT'], '[RFC2822]')?></pubDate>
 	<dc:creator><?=escapeHTML($USER['ATTR']['FULLNAME'])?></dc:creator>
 	<description><?=escapeHTML(description($HTML, 400))?></description>
-- 
cgit v1.2.3