aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/functions.php11
-rw-r--r--core/include/feed/main.php5
2 files changed, 4 insertions, 12 deletions
diff --git a/core/functions.php b/core/functions.php
index 538849b..bf04ccc 100644
--- a/core/functions.php
+++ b/core/functions.php
@@ -111,7 +111,6 @@ function generateItemTemplateData(EntityInterface $Entity): array {
return [
'URL' => Application::getEntityURL($Entity),
- 'GUID' => generatePseudoGUID($Entity),
'ARGV' => $arguments,
'ATTR' => $attribute,
@@ -152,16 +151,6 @@ function generateCategoryDataTree(array $category_data, $root = 0): array {
}
#===============================================================================
-# Generate pseudo GUID for entity
-#===============================================================================
-function generatePseudoGUID(EntityInterface $Entity) {
- return sha1(implode('', [
- $Entity->getID(),
- $Entity->get('time_insert')
- ]));
-}
-
-#===============================================================================
# Parse content tags
#===============================================================================
function parseContentTags(string $text): string {
diff --git a/core/include/feed/main.php b/core/include/feed/main.php
index cbabb2c..9f1e4d4 100644
--- a/core/include/feed/main.php
+++ b/core/include/feed/main.php
@@ -31,7 +31,10 @@ foreach($posts as $Post) {
$ItemTemplate = Template\Factory::build('feed/item_post');
}
- $ItemTemplate->set('POST', generateItemTemplateData($Post));
+ $post_data = generateItemTemplateData($Post);
+ $post_data['GUID'] = sha1($Post->getID().$Post->get('time_insert'));
+
+ $ItemTemplate->set('POST', $post_data);
$ItemTemplate->set('USER', generateItemTemplateData($User));
$templates[] = $ItemTemplate;