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
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-08-10 11:32:25 +0300
committerVincent Petry <pvince81@owncloud.com>2016-08-15 12:09:39 +0300
commitc8a385d61e3e534319defb94766d99a20456371e (patch)
tree36e0384fbbc7c76c32007a4674212d83dd52053d /lib
parent4033a6b65adf4e68e1d22b730ed2353f457f9aa9 (diff)
Get shared storage numeric id directly from DB
To prevent recursions in initMountPoints which requires the numeric id to populate oc_mounts
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Config/LazyStorageMountInfo.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/private/Files/Config/LazyStorageMountInfo.php b/lib/private/Files/Config/LazyStorageMountInfo.php
index 5df04c4b78e..3af6a7fddb4 100644
--- a/lib/private/Files/Config/LazyStorageMountInfo.php
+++ b/lib/private/Files/Config/LazyStorageMountInfo.php
@@ -47,11 +47,15 @@ class LazyStorageMountInfo extends CachedMountInfo {
*/
public function getStorageId() {
if (!$this->storageId) {
- $storage = $this->mount->getStorage();
- if (!$storage) {
- return -1;
+ if (method_exists($this->mount, 'getStorageNumericId')) {
+ $this->storageId = $this->mount->getStorageNumericId();
+ } else {
+ $storage = $this->mount->getStorage();
+ if (!$storage) {
+ return -1;
+ }
+ $this->storageId = $storage->getStorageCache()->getNumericId();
}
- $this->storageId = $storage->getStorageCache()->getNumericId();
}
return parent::getStorageId();
}