aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index 87ae5c6a5..a566ddfd9 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1973,8 +1973,9 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
);
}
else {
- $r = q("SELECT id FROM item WHERE mid = '%s' AND uid = %d and revision = %d LIMIT 1",
+ $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'])
);