From 10167fdf515e69c4645da9b0a020d0594c7a55a3 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 7 Apr 2014 02:55:00 -0700 Subject: prevent follows of and notifications to deceased channels --- include/zot.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index 48240d5aa..45df09661 100644 --- a/include/zot.php +++ b/include/zot.php @@ -632,6 +632,13 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED) { if($adult_changed) $new_flags = $new_flags ^ XCHAN_FLAGS_SELFCENSORED; + $deleted = (($r[0]['xchan_flags'] & XCHAN_FLAGS_DELETED) ? true : false); + $deleted_changed = ((intval($deleted) != intval($arr['deleted'])) ? true : false); + if($deleted_changed) + $new_flags = $new_flags ^ XCHAN_FLAGS_DELETED; + + + if(($r[0]['xchan_name_date'] != $arr['name_updated']) || ($r[0]['xchan_connurl'] != $arr['connections_url']) @@ -676,6 +683,8 @@ function import_xchan($arr,$ud_flags = UPDATE_FLAGS_UPDATED) { $new_flags = 0; if($arr['adult_content']) $new_flags |= XCHAN_FLAGS_SELFCENSORED; + if($arr['deleted']) + $new_flags |= XCHAN_FLAGS_DELETED; $x = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_mimetype, xchan_photo_l, xchan_addr, xchan_url, xchan_connurl, xchan_follow, xchan_connpage, xchan_name, xchan_network, xchan_photo_date, xchan_name_date, xchan_flags) -- cgit v1.2.3