diff options
-rw-r--r-- | include/channel.php | 8 | ||||
-rw-r--r-- | include/connections.php | 10 |
2 files changed, 10 insertions, 8 deletions
diff --git a/include/channel.php b/include/channel.php index 1101e39e9..708e70b1c 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1566,9 +1566,11 @@ function is_public_profile() { if(intval(get_config('system','block_public'))) return false; $channel = App::get_channel(); - if($channel && $channel['channel_r_profile'] == PERMS_PUBLIC) - return true; - + if($channel) { + $perm = \Zotlabs\Access\PermissionLimit::Get($channel['channel_id'],'view_profile'); + if($perm == PERMS_PUBLIC) + return true; + } return false; } diff --git a/include/connections.php b/include/connections.php index ed4526a09..9f55820cc 100644 --- a/include/connections.php +++ b/include/connections.php @@ -260,15 +260,15 @@ function channel_remove($channel_id, $local = true, $unset_session=false) { if(! $local) { - $r = q("update channel set channel_deleted = '%s', channel_removed = 1, channel_r_stream = 0, channel_r_profile = 0, - channel_r_photos = 0, channel_r_abook = 0, channel_w_stream = 0, channel_w_wall = 0, channel_w_tagwall = 0, - channel_w_comment = 0, channel_w_mail = 0, channel_w_photos = 0, channel_w_chat = 0, channel_a_delegate = 0, - channel_r_storage = 0, channel_w_storage = 0, channel_r_pages = 0, channel_w_pages = 0, channel_a_republish = 0 - where channel_id = %d", + $r = q("update channel set channel_deleted = '%s', channel_removed = 1 where channel_id = %d", dbesc(datetime_convert()), intval($channel_id) ); + q("delete from pconfig where uid = %d", + intval($channel_id) + ); + logger('deleting hublocs',LOGGER_DEBUG); $r = q("update hubloc set hubloc_deleted = 1 where hubloc_hash = '%s'", |