aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-06 15:33:10 -0800
committerzotlabs <mike@macgirvin.com>2017-03-06 15:33:10 -0800
commit595cb13d8f2793fcefdc1566715848479460e479 (patch)
treee6e7e635f6253f0bd0e8cd269ff6e21119ab2048 /include
parent9e44b0727513d820336cd4c51350d62b13cf8479 (diff)
downloadvolse-hubzilla-595cb13d8f2793fcefdc1566715848479460e479.tar.gz
volse-hubzilla-595cb13d8f2793fcefdc1566715848479460e479.tar.bz2
volse-hubzilla-595cb13d8f2793fcefdc1566715848479460e479.zip
correct fix for wiki anonymous read issue (items_permissions_sql checks item.public_policy which was set for posts, not wikis)
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index 6d21953a9..a297a1090 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;