From 434c48cff635317e51286e9bf2f1681feb48bf4b Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Sat, 24 Jul 2021 21:41:41 +0200 Subject: Remove configuration option "POST.FEED_GUID" Remove the configuration option "POST.FEED_GUID" that contained the name of the columns from the database which were passed to the SHA1 function for generating the pseudo GUID for the items in the RSS feed. --- core/functions.php | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'core/functions.php') diff --git a/core/functions.php b/core/functions.php index d5b56a2..538849b 100644 --- a/core/functions.php +++ b/core/functions.php @@ -155,19 +155,10 @@ function generateCategoryDataTree(array $category_data, $root = 0): array { # Generate pseudo GUID for entity #=============================================================================== function generatePseudoGUID(EntityInterface $Entity) { - switch(get_class($Entity)) { - case "ORM\Entities\Post": - $attr = Application::get('POST.FEED_GUID'); - break; - default: - $attr = ['id', 'time_insert']; - } - - foreach($attr as $attribute) { - $attributes[] = $Entity->get($attribute); - } - - return sha1(implode('', $attributes)); + return sha1(implode('', [ + $Entity->getID(), + $Entity->get('time_insert') + ])); } #=============================================================================== -- cgit v1.2.3