diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-10-16 23:38:52 +0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-10-16 23:38:52 +0400 |
commit | 012ea1ed839ec694d61ac44c61709afd00a684ac (patch) | |
tree | 21df714c35ab560e86d9dc2045c169a6b30ec1e4 /lib | |
parent | 247626b5c2b0e383aaffb5d75845d5fb18742547 (diff) |
Add unshareAll() function to Share API
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/share.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index faa44d74735..3e1c691d2b4 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -327,6 +327,20 @@ class Share { } /** + * @brief Unshare an item from all users, groups, and remove all links + * @param string Item type + * @param string Item source + * @return Returns true on success or false on failure + */ + public static function unshareAll($itemType, $itemSource) { + if ($item = self::getItemShared($itemType, $itemSource)) { + self::delete($item['id']); + return true; + } + return false; + } + + /** * @brief Unshare an item shared with the current user * @param string Item type * @param string Item target |