diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-08-10 11:32:25 +0300 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-08-15 12:09:39 +0300 |
commit | c8a385d61e3e534319defb94766d99a20456371e (patch) | |
tree | 36e0384fbbc7c76c32007a4674212d83dd52053d /lib | |
parent | 4033a6b65adf4e68e1d22b730ed2353f457f9aa9 (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.php | 12 |
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(); } |