aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php20
1 files changed, 5 insertions, 15 deletions
diff --git a/include/items.php b/include/items.php
index 0f477e761..752251a7e 100644
--- a/include/items.php
+++ b/include/items.php
@@ -1848,21 +1848,11 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
if($parent_deleted)
$arr['item_deleted'] = 1;
- if($arr['uuid']) {
- $r = q("SELECT id FROM item WHERE uuid = '%s' AND uid = %d and revision = %d LIMIT 1",
- dbesc($arr['uuid']),
- intval($arr['uid']),
- intval($arr['revision'])
- );
- }
- else {
- $r = q("SELECT id FROM item WHERE (mid = '%s' OR mid = '%s') AND uid = %d and revision = %d LIMIT 1",
- dbesc($arr['mid']),
- dbesc(basename(rawurldecode($arr['mid']))), // de-duplicate relayed comments from hubzilla < 4.0
- intval($arr['uid']),
- intval($arr['revision'])
- );
- }
+ $r = q("SELECT id FROM item WHERE uuid = '%s' AND uid = %d and revision = %d LIMIT 1",
+ dbesc($arr['uuid']),
+ intval($arr['uid']),
+ intval($arr['revision'])
+ );
if($r) {
logger('duplicate item ignored. ' . print_r($arr,true));