summaryrefslogtreecommitdiffstats
path: root/lib/private/util.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-08-07 17:31:03 +0200
committerVincent Petry <pvince81@owncloud.com>2015-08-07 17:31:03 +0200
commitb3a1aef93414ee1ec3a124f66a6964a27338b44c (patch)
treec933beada324e6bb810c4c57dbb1f7dde5320bbf /lib/private/util.php
parent404b5a2e4a4ddb1b2d6b8c430686b4c3fb68beb0 (diff)
parent75a5e6e12b18a9f5b7b113cd7e2c9c56c204084d (diff)
downloadnextcloud-server-b3a1aef93414ee1ec3a124f66a6964a27338b44c.tar.gz
nextcloud-server-b3a1aef93414ee1ec3a124f66a6964a27338b44c.zip
Merge pull request #13641 from owncloud/cache-storage-status
Store storage availability in database
Diffstat (limited to 'lib/private/util.php')
-rw-r--r--lib/private/util.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index 1b22e03ca6f..501dbf5c4c5 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -143,6 +143,14 @@ class OC_Util {
return $storage;
});
+ // install storage availability wrapper, before most other wrappers
+ \OC\Files\Filesystem::addStorageWrapper('oc_availability', function ($mountPoint, $storage) {
+ if (!$storage->isLocal()) {
+ return new \OC\Files\Storage\Wrapper\Availability(['storage' => $storage]);
+ }
+ return $storage;
+ });
+
\OC\Files\Filesystem::addStorageWrapper('oc_quota', function ($mountPoint, $storage) {
// set up quota for home storages, even for other users
// which can happen when using sharing