diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-06-02 22:39:36 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-06-02 22:39:36 +0200 |
commit | 3a9f149c803fa237a0412728f9e6f92e3b28bb04 (patch) | |
tree | c3c5da791342c4575208e24a24271e1e01d0cf6b /include | |
parent | a0e4f7ddb17088a704e4cf7dff2fcba35f1cc128 (diff) | |
parent | 5f612521da11cd4b9245909bf0a99a7431272e93 (diff) | |
download | volse-hubzilla-3a9f149c803fa237a0412728f9e6f92e3b28bb04.tar.gz volse-hubzilla-3a9f149c803fa237a0412728f9e6f92e3b28bb04.tar.bz2 volse-hubzilla-3a9f149c803fa237a0412728f9e6f92e3b28bb04.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include')
-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); + } } } |