Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/sharedstorage.php')
-rw-r--r--apps/files_sharing/lib/sharedstorage.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 02fcd7041dd..dc161616110 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -532,4 +532,21 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
return null;
}
+ /**
+ * unshare complete storage, also the grouped shares
+ *
+ * @return bool
+ */
+ public function unshareStorage() {
+ $result = true;
+ if (!empty($this->share['grouped'])) {
+ foreach ($this->share['grouped'] as $share) {
+ $result = $result && \OCP\Share::unshareFromSelf($share['item_type'], $share['file_target']);
+ }
+ }
+ $result = $result && \OCP\Share::unshareFromSelf($this->getItemType(), $this->getMountPoint());
+
+ return $result;
+ }
+
}