aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Settings/Channel.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-11 18:17:17 -0800
committerzotlabs <mike@macgirvin.com>2018-02-11 18:17:17 -0800
commit63107f5b2f5031a7cc971063b9344592cc2257e3 (patch)
tree1460896434e4b5338ffa05bf65c059c03dd4bb19 /Zotlabs/Module/Settings/Channel.php
parenta31331bfd9500ad7dab117692b2c118d99c5c2f0 (diff)
downloadvolse-hubzilla-63107f5b2f5031a7cc971063b9344592cc2257e3.tar.gz
volse-hubzilla-63107f5b2f5031a7cc971063b9344592cc2257e3.tar.bz2
volse-hubzilla-63107f5b2f5031a7cc971063b9344592cc2257e3.zip
second part of hubzilla issue #972
Diffstat (limited to 'Zotlabs/Module/Settings/Channel.php')
-rw-r--r--Zotlabs/Module/Settings/Channel.php9
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'];