second part of hubzilla issue #972
This commit is contained in:
parent
a31331bfd9
commit
63107f5b2f
@ -331,22 +331,21 @@ class Channel {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$limits = \Zotlabs\Access\PermissionLimits::Get(local_channel());
|
$limits = \Zotlabs\Access\PermissionLimits::Get(local_channel());
|
||||||
|
$anon_comments = get_config('system','anonymous_comments',true);
|
||||||
|
|
||||||
foreach($global_perms as $k => $perm) {
|
foreach($global_perms as $k => $perm) {
|
||||||
$options = array();
|
$options = array();
|
||||||
|
$can_be_public = ((strstr($k,'view') || ($k === 'post_comments' && $anon_comments)) ? true : false);
|
||||||
foreach($perm_opts as $opt) {
|
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;
|
continue;
|
||||||
$options[$opt[1]] = $opt[0];
|
$options[$opt[1]] = $opt[0];
|
||||||
}
|
}
|
||||||
$permiss[] = array($k,$perm,$limits[$k],'',$options);
|
$permiss[] = array($k,$perm,$limits[$k],'',$options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// logger('permiss: ' . print_r($permiss,true));
|
// logger('permiss: ' . print_r($permiss,true));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$username = $channel['channel_name'];
|
$username = $channel['channel_name'];
|
||||||
$nickname = $channel['channel_address'];
|
$nickname = $channel['channel_address'];
|
||||||
$timezone = $channel['channel_timezone'];
|
$timezone = $channel['channel_timezone'];
|
||||||
|
Reference in New Issue
Block a user