diff options
author | Andreas Fischer <bantu@owncloud.com> | 2013-09-23 16:43:08 +0200 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-11-03 12:33:34 +0100 |
commit | 1d1f5b288e404c8c69aa4550b0f4fa9508b00204 (patch) | |
tree | fc2b0edbf37c1e98c0a526264962585d5e3812f8 /lib/public/share.php | |
parent | 329299e34cf14c57ce04fe4e2abb28fc26c0b3da (diff) | |
download | nextcloud-server-1d1f5b288e404c8c69aa4550b0f4fa9508b00204.tar.gz nextcloud-server-1d1f5b288e404c8c69aa4550b0f4fa9508b00204.zip |
Extract unshare() code into unshareItem().
Diffstat (limited to 'lib/public/share.php')
-rw-r--r-- | lib/public/share.php | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index a8d1436e100..2d56ea7220c 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -634,23 +634,7 @@ class Share { public static function unshare($itemType, $itemSource, $shareType, $shareWith) { if ($item = self::getItems($itemType, $itemSource, $shareType, $shareWith, \OC_User::getUser(), self::FORMAT_NONE, null, 1)) { - // Pass all the vars we have for now, they may be useful - \OC_Hook::emit('OCP\Share', 'pre_unshare', array( - 'itemType' => $itemType, - 'itemSource' => $itemSource, - 'fileSource' => $item['file_source'], - 'shareType' => $shareType, - 'shareWith' => $shareWith, - 'itemParent' => $item['parent'], - )); - self::delete($item['id']); - \OC_Hook::emit('OCP\Share', 'post_unshare', array( - 'itemType' => $itemType, - 'itemSource' => $itemSource, - 'shareType' => $shareType, - 'shareWith' => $shareWith, - 'itemParent' => $item['parent'], - )); + self::unshareItem($item); return true; } return false; |