aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-03-20 18:04:22 +0100
committerMario Vavti <mario@mariovavti.com>2015-03-20 18:04:22 +0100
commit9a2ef382679fb7f3cf3f87bc1abaf74835ea273b (patch)
treed63586677d3ac387a02c4f3546105f0d426ff3c7
parent264b43db05fe0a9a4ec4402eb43c7ecf501d4fee (diff)
downloadvolse-hubzilla-9a2ef382679fb7f3cf3f87bc1abaf74835ea273b.tar.gz
volse-hubzilla-9a2ef382679fb7f3cf3f87bc1abaf74835ea273b.tar.bz2
volse-hubzilla-9a2ef382679fb7f3cf3f87bc1abaf74835ea273b.zip
need the cloudpath before creating the object
-rw-r--r--mod/filestorage.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/mod/filestorage.php b/mod/filestorage.php
index 07987e4c4..f2c795379 100644
--- a/mod/filestorage.php
+++ b/mod/filestorage.php
@@ -33,15 +33,14 @@ function filestorage_post(&$a) {
$str_group_deny = perms2str($_REQUEST['group_deny']);
$str_contact_deny = perms2str($_REQUEST['contact_deny']);
+ $channel = $a->get_channel();
+ $cloudPath = get_parent_cloudpath($channel_id, $channel['channel_address'], $resource);
+
//get the object before permissions change so we can catch eventual former allowed members
$object = get_file_activity_object($channel_id, $resource, $cloudPath);
attach_change_permissions($channel_id, $resource, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny, $recurse);
- //Build directory tree and redirect
- $channel = $a->get_channel();
- $cloudPath = get_parent_cloudpath($channel_id, $channel['channel_address'], $resource);
-
file_activity($channel_id, $object, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny, 'post', $no_activity);
goaway($cloudPath);