aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/application.php3
-rw-r--r--core/functions.php17
2 files changed, 5 insertions, 15 deletions
diff --git a/core/application.php b/core/application.php
index 0c73f54..2f6a277 100644
--- a/core/application.php
+++ b/core/application.php
@@ -89,8 +89,7 @@ foreach([
'PAGE.LIST_SORT' => 'time_insert DESC',
'POST.LIST_SORT' => 'time_insert DESC',
'USER.LIST_SORT' => 'time_insert DESC',
- 'POST.FEED_SORT' => 'time_insert DESC',
- 'POST.FEED_GUID' => ['id', 'time_insert']
+ 'POST.FEED_SORT' => 'time_insert DESC'
] as $name => $value) {
Application::set($name, $value);
}
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')
+ ]));
}
#===============================================================================