diff options
author | Christian Vogeley <christian.vogeley@hotmail.de> | 2015-01-11 16:22:59 +0100 |
---|---|---|
committer | Christian Vogeley <christian.vogeley@hotmail.de> | 2015-01-11 16:22:59 +0100 |
commit | f0c7612bcd49d32e408e67ac1829ee891c677f7e (patch) | |
tree | d4cff4aa2d728524b631776ffffee71f42056421 /include/zot.php | |
parent | 43f143a211c75138d09ceb89acc48ea7d5c31ca9 (diff) | |
parent | 10102ac2ac4d5b02012a9794e23656717ab05556 (diff) | |
download | volse-hubzilla-f0c7612bcd49d32e408e67ac1829ee891c677f7e.tar.gz volse-hubzilla-f0c7612bcd49d32e408e67ac1829ee891c677f7e.tar.bz2 volse-hubzilla-f0c7612bcd49d32e408e67ac1829ee891c677f7e.zip |
Merge remote-tracking branch 'upstream/master'
Conflicts:
doc/html/classRedmatrix_1_1Import_1_1Import-members.html
doc/html/classRedmatrix_1_1Import_1_1Import.js
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/zot.php b/include/zot.php index c88b2a369..384769d61 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']); @@ -2363,6 +2368,9 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) { logger('build_sync_packet'); + if($packet) + logger('packet: ' . print_r($packet,true),LOGGER_DATA); + if(! $uid) $uid = local_user(); |