Fix unshareAll()

Conflicts:

	lib/public/share.php
remotes/origin/stable45
Michael Gapczynski 13 years ago committed by Thomas Tanghus
parent 5271c1a9ad
commit 7feb0f737b
  1. 6
      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;

Loading…
Cancel
Save