diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-05-16 17:44:28 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-05-16 17:44:28 +0200 |
commit | 95297c246970f5e185b94cbc320b28d88a7c0d6d (patch) | |
tree | 78ceecfa4816eba0840c7b199438835f458465fa /lib/public | |
parent | f1a5b8b524531567ba18c6e08a6f7110dcff18d7 (diff) | |
download | nextcloud-server-95297c246970f5e185b94cbc320b28d88a7c0d6d.tar.gz nextcloud-server-95297c246970f5e185b94cbc320b28d88a7c0d6d.zip |
add pre-shared hooks
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/share.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index b2eeb29234a..e1538152d80 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -1207,6 +1207,17 @@ class Share { if ($shareType == self::SHARE_TYPE_GROUP) { $groupItemTarget = self::generateTarget($itemType, $itemSource, $shareType, $shareWith['group'], $uidOwner, $suggestedItemTarget); + \OC_Hook::emit('OCP\Share', 'pre_shared', array( + 'itemType' => $itemType, + 'itemSource' => $itemSource, + 'itemTarget' => $groupItemTarget, + 'shareType' => $shareType, + 'shareWith' => $shareWith['group'], + 'uidOwner' => $uidOwner, + 'permissions' => $permissions, + 'fileSource' => $fileSource, + 'token' => $token + )); if (isset($fileSource)) { if ($parentFolder) { if ($parentFolder === true) { @@ -1282,6 +1293,17 @@ class Share { } else { $itemTarget = self::generateTarget($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $suggestedItemTarget); + \OC_Hook::emit('OCP\Share', 'pre_shared', array( + 'itemType' => $itemType, + 'itemSource' => $itemSource, + 'itemTarget' => $itemTarget, + 'shareType' => $shareType, + 'shareWith' => $shareWith, + 'uidOwner' => $uidOwner, + 'permissions' => $permissions, + 'fileSource' => $fileSource, + 'token' => $token + )); if (isset($fileSource)) { if ($parentFolder) { if ($parentFolder === true) { |