diff options
Diffstat (limited to 'Zotlabs/Module/Settings/Channel.php')
-rw-r--r-- | Zotlabs/Module/Settings/Channel.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php index 5e9e88a6d..fb8284d2e 100644 --- a/Zotlabs/Module/Settings/Channel.php +++ b/Zotlabs/Module/Settings/Channel.php @@ -331,22 +331,21 @@ class Channel { ); $limits = \Zotlabs\Access\PermissionLimits::Get(local_channel()); + $anon_comments = get_config('system','anonymous_comments',true); foreach($global_perms as $k => $perm) { $options = array(); + $can_be_public = ((strstr($k,'view') || ($k === 'post_comments' && $anon_comments)) ? true : false); foreach($perm_opts as $opt) { - if(((! strstr($k,'view')) && $k !== 'post_comments') && $opt[1] == PERMS_PUBLIC) + if($opt[1] == PERMS_PUBLIC && (! $can_be_public)) continue; $options[$opt[1]] = $opt[0]; } $permiss[] = array($k,$perm,$limits[$k],'',$options); } - - + // logger('permiss: ' . print_r($permiss,true)); - - $username = $channel['channel_name']; $nickname = $channel['channel_address']; $timezone = $channel['channel_timezone']; |