aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Item.php9
-rw-r--r--include/conversation.php22
2 files changed, 8 insertions, 23 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index b54de0fb9..f2b850ffc 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -577,15 +577,6 @@ class Item extends \Zotlabs\Web\Controller {
* so we'll set the permissions regardless and realise that the media may not be
* referenced in the post.
*
- * What is preventing us from being able to upload photos into comments is dealing with
- * the photo and attachment permissions, since we don't always know who was in the
- * distribution for the top level post.
- *
- * We might be able to provide this functionality with a lot of fiddling:
- * - if the top level post is public (make the photo public)
- * - if the top level post was written by us or a wall post that belongs to us (match the top level post)
- * - if the top level post has privacy mentions, add those to the permissions.
- * - otherwise disallow the photo *or* make the photo public. This is the part that gets messy.
*/
if(! $preview) {
diff --git a/include/conversation.php b/include/conversation.php
index 0b9df5acd..1cbd9116c 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -573,22 +573,16 @@ 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;
- }
- if(\Zotlabs\Access\PermissionLimits::Get($profile_owner,'view_storage') !== PERMS_PUBLIC) {
- $uploading = false;
+ $uploading = false;
+
+ if(local_channel()) {
+ $cur_channel = App::get_channel();
+ if($cur_channel['channel_allow_cid'] === '' && $cur_channel['channel_allow_gid'] === ''
+ && $cur_channel['channel_deny_cid'] === '' && $cur_channel['channel_deny_gid'] === ''
+ && intval(\Zotlabs\Access\PermissionLimits::Get(local_channel(),'view_storage')) === PERMS_PUBLIC) {
+ $uploading = true;
}
}
- else {
- $uploading = false;
- }
-
$channel = App::get_channel();
$observer = App::get_observer();