diff options
author | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-07 22:07:11 +0100 |
---|---|---|
committer | Stefan Parviainen <saparvia@caterva.eu> | 2015-01-07 22:07:11 +0100 |
commit | 7176eb88452b3c74652de09e44de41943051391c (patch) | |
tree | 0ab8af1ffb5a92962b2918e274cae26046897d11 /include/zot.php | |
parent | f3cd29f829ab66fe1f9fac306dcc6fa20858ad52 (diff) | |
parent | a373b9f1d4d0ee6781927c3fcf05e0e301a80b6e (diff) | |
download | volse-hubzilla-7176eb88452b3c74652de09e44de41943051391c.tar.gz volse-hubzilla-7176eb88452b3c74652de09e44de41943051391c.tar.bz2 volse-hubzilla-7176eb88452b3c74652de09e44de41943051391c.zip |
Merge autocomplete caching, show more results in navbar search
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 11 |
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']); |