aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-08-10 21:08:07 -0700
committerzotlabs <mike@macgirvin.com>2017-08-10 21:08:07 -0700
commit1408e3da3bcb818134b76db338fb913ae0b54aa1 (patch)
treee9c6722cec7f308e5960622f022d0f28d056b171 /include
parent5f6eedcc1a6e719c2ac6fa93219f700e0d430b59 (diff)
downloadvolse-hubzilla-1408e3da3bcb818134b76db338fb913ae0b54aa1.tar.gz
volse-hubzilla-1408e3da3bcb818134b76db338fb913ae0b54aa1.tar.bz2
volse-hubzilla-1408e3da3bcb818134b76db338fb913ae0b54aa1.zip
prevent uploads to comments if the channel has a default private ACL.
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/conversation.php b/include/conversation.php
index f15077e76..30ba4d812 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -550,6 +550,19 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
if (! feature_enabled($profile_owner,'multi_delete'))
$page_dropping = false;
+ $uploading = true;
+
+ if($profile_owner > 0) {
+ $owner_channel = channelx_by_n($profile_owner);
+ if($owner_channel['channel_allow_cid'] || $owner_channel['channel_allow_gid']
+ || $owner_channel['channel_deny_cid'] || $owner_channel['channel_deny_gid']) {
+ $uploading = false;
+ }
+ }
+ else {
+ $uploading = false;
+ }
+
$channel = App::get_channel();
$observer = App::get_observer();
@@ -753,7 +766,7 @@ function conversation($items, $mode, $update, $page_mode = 'traditional', $prepa
// Normal View
// logger('conv: items: ' . print_r($items,true));
- $conv = new Zotlabs\Lib\ThreadStream($mode, $preview, $prepared_item);
+ $conv = new Zotlabs\Lib\ThreadStream($mode, $preview, $uploading, $prepared_item);
// In the display mode we don't have a profile owner.