aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-03-24 16:45:21 +0100
committerMax Kostikov <max@kostikov.co>2019-03-24 16:45:21 +0100
commit333534dfe7ddd87dcab9e1196f37694b75b6bd17 (patch)
tree564fd423b7845e4d096356e2141f0b926185ae12 /include/items.php
parent9ebf6bcc92acb03fbdc237e8e44f5391586b42cb (diff)
parentd8ce0d0df0b7b58b3f2a1abfc26f455fb943f8ea (diff)
downloadvolse-hubzilla-333534dfe7ddd87dcab9e1196f37694b75b6bd17.tar.gz
volse-hubzilla-333534dfe7ddd87dcab9e1196f37694b75b6bd17.tar.bz2
volse-hubzilla-333534dfe7ddd87dcab9e1196f37694b75b6bd17.zip
Merge branch 'items_fixes' into 'dev'
item_store(): deduplicate by mid OR uuid possible fix for #1349 See merge request hubzilla/core!1570
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index c9c2e2d48..6857964fb 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1930,8 +1930,9 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
if($parent_deleted)
$arr['item_deleted'] = 1;
- $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 uuid = '%s') AND uid = %d and revision = %d LIMIT 1",
dbesc($arr['mid']),
+ dbesc($arr['uuid']),
intval($arr['uid']),
intval($arr['revision'])
);