From df19cabb44f9106484290a269ef6d4cb07b059d7 Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Fri, 23 Jan 2015 21:53:21 +0000 Subject: Store storage availability in database Storage status is saved in the database. Failed storages are rechecked every 10 minutes, while working storages are rechecked every request. Using the files_external app will recheck all external storages when the settings page is viewed, or whenever an external storage is saved. --- lib/private/util.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/private/util.php') diff --git a/lib/private/util.php b/lib/private/util.php index 39d64952dc6..8a85a8a5f0d 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 -- cgit v1.2.3