aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-03-07 12:08:43 +0100
committerMario Vavti <mario@mariovavti.com>2017-03-07 12:08:43 +0100
commit8e3a02627629d29c3552f8332de1ab32b9c99ffe (patch)
tree0623edef78f3e2f0efbff364ed7ea6e4d98169b6 /include
parentb5ddd0863005a5c3d04bc18e319284cad0833a88 (diff)
parenta037590ce30cd34e674a303659888af94a48be09 (diff)
downloadvolse-hubzilla-8e3a02627629d29c3552f8332de1ab32b9c99ffe.tar.gz
volse-hubzilla-8e3a02627629d29c3552f8332de1ab32b9c99ffe.tar.bz2
volse-hubzilla-8e3a02627629d29c3552f8332de1ab32b9c99ffe.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 6d21953a9..36445a46b 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'];