aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-06 15:44:23 -0800
committerfriendica <info@friendica.com>2015-01-06 15:44:23 -0800
commitfbe0610ce9a4ef62da8aba166250485f56e73d03 (patch)
tree830df013d96617eec3e8fd8f2d7e13223fa95665 /include/zot.php
parentbb67ab1fbf2271ed7dead5da72f665115fd0c9fe (diff)
downloadvolse-hubzilla-fbe0610ce9a4ef62da8aba166250485f56e73d03.tar.gz
volse-hubzilla-fbe0610ce9a4ef62da8aba166250485f56e73d03.tar.bz2
volse-hubzilla-fbe0610ce9a4ef62da8aba166250485f56e73d03.zip
don't update locally deleted items
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/zot.php b/include/zot.php
index c88b2a369..c21ad8a3f 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1542,15 +1542,20 @@ function process_delivery($sender,$arr,$deliveries,$relay,$public = false,$reque
continue;
}
- $r = q("select id, edited, item_flags, mid, parent_mid from item where mid = '%s' and uid = %d limit 1",
+ $r = q("select id, edited, item_restrict, item_flags, mid, parent_mid from item where mid = '%s' and uid = %d limit 1",
dbesc($arr['mid']),
intval($channel['channel_id'])
);
if($r) {
// We already have this post.
- // Maybe it has been edited?
$item_id = $r[0]['id'];
- if($arr['edited'] > $r[0]['edited']) {
+ if($r[0]['item_restrict'] & ITEM_DELETED) {
+ // It was deleted locally.
+ $result[] = array($d['hash'],'update ignored',$channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>',$arr['mid']);
+ continue;
+ }
+ // Maybe it has been edited?
+ elseif($arr['edited'] > $r[0]['edited']) {
$arr['id'] = $r[0]['id'];
$arr['uid'] = $channel['channel_id'];
update_imported_item($sender,$arr,$channel['channel_id']);