mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
Fix unshareAll()
Conflicts: lib/public/share.php
This commit is contained in:
parent
5271c1a9ad
commit
7feb0f737b
1 changed files with 4 additions and 2 deletions
|
|
@ -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…
Reference in a new issue