From c00f5d164fb5eb6e00ed17716bc8af6868c165b6 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Tue, 16 Oct 2012 16:26:55 -0400 Subject: Fix unshareAll() --- lib/public/share.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') 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; -- cgit v1.2.3