diff options
author | Andrew Manning <tamanning@zoho.com> | 2018-06-08 05:22:01 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2018-06-08 05:22:01 -0400 |
commit | df2d18160212ec546ec640dd1d2152fecada5557 (patch) | |
tree | 126504df4e5ab2d42defbee153a748fe40253b38 /include/connections.php | |
parent | ed17e8a6499e48b032393be351c39f31a0edcbf3 (diff) | |
parent | 7bf1c5f27b8b8f0eea226e81a5db99585c5a56b3 (diff) | |
download | volse-hubzilla-df2d18160212ec546ec640dd1d2152fecada5557.tar.gz volse-hubzilla-df2d18160212ec546ec640dd1d2152fecada5557.tar.bz2 volse-hubzilla-df2d18160212ec546ec640dd1d2152fecada5557.zip |
Merge branch 'dev' of framagit.org:hubzilla/core into dev
Diffstat (limited to 'include/connections.php')
-rw-r--r-- | include/connections.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/connections.php b/include/connections.php index 32baa94bd..5a9e31950 100644 --- a/include/connections.php +++ b/include/connections.php @@ -374,14 +374,19 @@ function contact_remove($channel_id, $abook_id) { return false; - $r = q("select id from item where (owner_xchan = '%s' or author_xchan = '%s') and uid = %d", + $r = q("select id from item where (owner_xchan = '%s' or author_xchan = '%s') and uid = %d and item_retained = 0 and item_starred = 0", dbesc($abook['abook_xchan']), dbesc($abook['abook_xchan']), intval($channel_id) ); if($r) { + $r = fetch_post_tags($r,true); + foreach($r as $rr) { - drop_item($rr['id'],false); + $terms = get_terms_oftype($item['term'],TERM_FILE); + if(! $terms) { + drop_item($rr['id'],false); + } } } |