diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-03-04 19:43:56 -0500 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-03-04 19:43:56 -0500 |
commit | ee0c38bb5112af4aa491b526ca390de52dd3ab7e (patch) | |
tree | c4bcaedf4f478f0dd3d8b8ce584fa1a2157e0a72 /lib/public | |
parent | e466d680fea1738bfa5eeb12a13b6e8fa858a986 (diff) | |
download | nextcloud-server-ee0c38bb5112af4aa491b526ca390de52dd3ab7e.tar.gz nextcloud-server-ee0c38bb5112af4aa491b526ca390de52dd3ab7e.zip |
Fix group post_shared hook
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/share.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index f3c1da74761..eadf24b14eb 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -1103,20 +1103,6 @@ class Share { } else { $fileTarget = null; } - \OC_Hook::emit('OCP\Share', 'post_shared', array( - 'itemType' => $itemType, - 'itemSource' => $itemSource, - 'itemTarget' => $itemTarget, - 'parent' => $parent, - 'shareType' => self::$shareTypeGroupUserUnique, - 'shareWith' => $uid, - 'uidOwner' => $uidOwner, - 'permissions' => $permissions, - 'fileSource' => $fileSource, - 'fileTarget' => $fileTarget, - 'id' => $parent, - 'token' => $token - )); // Insert an extra row for the group share if the item or file target is unique for this user if ($itemTarget != $groupItemTarget || (isset($fileSource) && $fileTarget != $groupFileTarget)) { $query->execute(array($itemType, $itemSource, $itemTarget, $parent, @@ -1125,6 +1111,20 @@ class Share { $id = \OC_DB::insertid('*PREFIX*share'); } } + \OC_Hook::emit('OCP\Share', 'post_shared', array( + 'itemType' => $itemType, + 'itemSource' => $itemSource, + 'itemTarget' => $groupItemTarget, + 'parent' => $parent, + 'shareType' => $shareType, + 'shareWith' => $uid, + 'uidOwner' => $uidOwner, + 'permissions' => $permissions, + 'fileSource' => $fileSource, + 'fileTarget' => $groupFileTarget, + 'id' => $parent, + 'token' => $token + )); if ($parentFolder === true) { // Return parent folders to preserve file target paths for potential children return $parentFolders; |