aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-02-20 23:13:27 -0800
committerzotlabs <mike@macgirvin.com>2017-02-20 23:13:27 -0800
commit5ad5a0fa07e018b2216b38f0a3e31df763491982 (patch)
treee4e3c6adc7e2c6fafb60700716c73cab1a740106 /include
parente54ba7ecbc7391069b38d9f911bf77623d0ee582 (diff)
downloadvolse-hubzilla-5ad5a0fa07e018b2216b38f0a3e31df763491982.tar.gz
volse-hubzilla-5ad5a0fa07e018b2216b38f0a3e31df763491982.tar.bz2
volse-hubzilla-5ad5a0fa07e018b2216b38f0a3e31df763491982.zip
detect no acl
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index e667c0348..6d21953a9 100755
--- a/include/items.php
+++ b/include/items.php
@@ -359,10 +359,12 @@ function post_activity_item($arr,$allow_code = false,$deliver = true) {
if(($is_comment) && ($arr['obj_type'] === ACTIVITY_OBJ_NOTE))
$arr['obj_type'] = ACTIVITY_OBJ_COMMENT;
- $arr['allow_cid'] = ((x($arr,'allow_cid')) ? $arr['allow_cid'] : $channel['channel_allow_cid']);
- $arr['allow_gid'] = ((x($arr,'allow_gid')) ? $arr['allow_gid'] : $channel['channel_allow_gid']);
- $arr['deny_cid'] = ((x($arr,'deny_cid')) ? $arr['deny_cid'] : $channel['channel_deny_cid']);
- $arr['deny_gid'] = ((x($arr,'deny_gid')) ? $arr['deny_gid'] : $channel['channel_deny_gid']);
+ if(! ($arr['allow_cid'] || $arr['allow_gid'] || $arr['deny_cid'] || $arr['deny_gid'])) {
+ $arr['allow_cid'] = $channel['channel_allow_cid'];
+ $arr['allow_gid'] = $channel['channel_allow_gid'];
+ $arr['deny_cid'] = $channel['channel_deny_cid'];
+ $arr['deny_gid'] = $channel['channel_deny_gid'];
+ }
$arr['comment_policy'] = map_scope(\Zotlabs\Access\PermissionLimits::Get($channel['channel_id'],'post_comments'));