From c960cfcd556b0abc0e7a1690a49b8527bf401498 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Fri, 24 May 2013 13:15:51 +0200 Subject: [PATCH] add post hooks to share API, needed by the encryption app --- lib/public/share.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/public/share.php b/lib/public/share.php index dbe3c7193e4..7cebf654639 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -515,8 +515,16 @@ class Share { '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'], + )); return true; } return false; @@ -539,6 +547,11 @@ class Share { foreach ($shares as $share) { self::delete($share['id']); } + \OC_Hook::emit('OCP\Share', 'post_unshareAll', array( + 'itemType' => $itemType, + 'itemSource' => $itemSource, + 'shares' => $shares + )); return true; } return false; -- 2.39.5