diff options
author | Thomas Lange <code@nerdmind.de> | 2021-07-24 21:41:41 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2021-07-24 21:44:26 +0200 |
commit | 434c48cff635317e51286e9bf2f1681feb48bf4b (patch) | |
tree | 70e5453daf5fadc3e76d7a007a8b41c8a80d53d0 /core/functions.php | |
parent | a7b982bf620f19804d2f762d769e1de820bad252 (diff) | |
download | blog-434c48cff635317e51286e9bf2f1681feb48bf4b.tar.gz blog-434c48cff635317e51286e9bf2f1681feb48bf4b.tar.xz blog-434c48cff635317e51286e9bf2f1681feb48bf4b.zip |
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.
Diffstat (limited to 'core/functions.php')
-rw-r--r-- | core/functions.php | 17 |
1 files changed, 4 insertions, 13 deletions
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') + ])); } #=============================================================================== |