aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/hooks
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-05-16 00:34:45 +0200
committerFlorin Peter <github@florin-peter.de>2013-05-16 00:34:45 +0200
commitc651950a17cf1381a832e172191e4f4cc172569b (patch)
treeef8e24eadd0fe1b1df5a09cf2248efbac10b53f2 /apps/files_encryption/hooks
parentc0c4fe5fd3cd575656ed30b4464bb6bc3c6d4f40 (diff)
downloadnextcloud-server-c651950a17cf1381a832e172191e4f4cc172569b.tar.gz
nextcloud-server-c651950a17cf1381a832e172191e4f4cc172569b.zip
fix for re-share and removed check if file exists because we are sometime into a pre_put_contents hook
Diffstat (limited to 'apps/files_encryption/hooks')
-rw-r--r--apps/files_encryption/hooks/hooks.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 8f03087e568..f843c7027d5 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -231,8 +231,9 @@ class Hooks {
$util = new Util($view, $userId);
$path = $util->fileIdToPath($params['itemSource']);
+ $share = $util->getParentFromShare($params['id']);
//if parent is set, then this is a re-share action
- if ($params['parent']) {
+ if ($share['parent'] != null) {
// get the parent from current share
$parent = $util->getShareParent($params['parent']);