hubzilla issue #972 - provide system toggle to allow/disallow anonymous comments

This commit is contained in:
zotlabs 2018-02-11 18:02:28 -08:00
parent 07d33a1183
commit a31331bfd9
2 changed files with 4 additions and 2 deletions

View File

@ -41,8 +41,10 @@ class PermissionLimits {
$limits = [];
$perms = Permissions::Perms();
$anon_comments = get_config('system','anonymous_comments',true);
foreach($perms as $k => $v) {
if(strstr($k, 'view') || $k === 'post_comments')
if(strstr($k, 'view') || ($k === 'post_comments' && $anon_comments))
$limits[$k] = PERMS_PUBLIC;
else
$limits[$k] = PERMS_SPECIFIC;

View File

@ -3653,7 +3653,7 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL, $force = false) {
$linked_item = (($item['resource_id']) ? true : false);
logger('item: ' . $item . ' stage: ' . $stage . ' force: ' . $force, LOGGER_DATA);
logger('item: ' . $item['id'] . ' stage: ' . $stage . ' force: ' . $force, LOGGER_DATA);
switch($stage) {
case DROPITEM_PHASE2: