summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-10-16 16:26:55 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-10-16 16:27:23 -0400
commitc00f5d164fb5eb6e00ed17716bc8af6868c165b6 (patch)
tree83f71e6561abd8a7f2355afe66dbc716ab9107ff
parent379b775a56f681b0cb375dd54018c1dd6e7a62fc (diff)
downloadnextcloud-server-c00f5d164fb5eb6e00ed17716bc8af6868c165b6.tar.gz
nextcloud-server-c00f5d164fb5eb6e00ed17716bc8af6868c165b6.zip
Fix unshareAll()
-rw-r--r--lib/public/share.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index 3e1c691d2b4..d27802b52f7 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -333,8 +333,10 @@ class Share {
* @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']);
+ if ($shares = self::getItemShared($itemType, $itemSource)) {
+ foreach ($shares as $share) {
+ self::delete($share['id']);
+ }
return true;
}
return false;