aboutsummaryrefslogtreecommitdiffstats
path: root/core/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/functions.php')
-rw-r--r--core/functions.php17
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')
+ ]));
}
#===============================================================================