aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-09 14:17:14 -0800
committerzotlabs <mike@macgirvin.com>2017-03-09 14:17:14 -0800
commit15d422db80234d220f0ead0b5554f82f50e571e7 (patch)
treefff7e2fb2d4a4bd05f9e91e7a7328b71e6d3e755 /include/items.php
parentb6477cd38b532ebe69a480460e7b883964ec6627 (diff)
parent15ab331b6b5793d04979e204af92084e8d5bb03c (diff)
downloadvolse-hubzilla-15d422db80234d220f0ead0b5554f82f50e571e7.tar.gz
volse-hubzilla-15d422db80234d220f0ead0b5554f82f50e571e7.tar.bz2
volse-hubzilla-15d422db80234d220f0ead0b5554f82f50e571e7.zip
Merge branch 'dspr' into red
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 8032f53c4..033863c42 100755
--- a/include/items.php
+++ b/include/items.php
@@ -328,7 +328,8 @@ function post_activity_item($arr,$allow_code = false,$deliver = true) {
return $ret;
}
- $arr['public_policy'] = ((x($_REQUEST,'public_policy')) ? escape_tags($_REQUEST['public_policy']) : map_scope(\Zotlabs\Access\PermissionLimits::Get($channel['channel_id'],'view_stream'),true));
+ $arr['public_policy'] = ((array_key_exists('public_policy',$arr)) ? escape_tags($arr['public_policy']) : map_scope(\Zotlabs\Access\PermissionLimits::Get($channel['channel_id'],'view_stream'),true));
+
if($arr['public_policy'])
$arr['item_private'] = 1;
@@ -359,7 +360,8 @@ 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;
- if(! ($arr['allow_cid'] || $arr['allow_gid'] || $arr['deny_cid'] || $arr['deny_gid'])) {
+ if(! ( array_key_exists('allow_cid',$arr) || array_key_exists('allow_gid',$arr)
+ || array_key_exists('deny_cid',$arr) || array_key_exists('deny_gid',$arr))) {
$arr['allow_cid'] = $channel['channel_allow_cid'];
$arr['allow_gid'] = $channel['channel_allow_gid'];
$arr['deny_cid'] = $channel['channel_deny_cid'];