aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Files/Cache/StorageGlobal.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/StorageGlobal.php b/lib/private/Files/Cache/StorageGlobal.php
index 65f689f1874..076b5b8f53d 100644
--- a/lib/private/Files/Cache/StorageGlobal.php
+++ b/lib/private/Files/Cache/StorageGlobal.php
@@ -69,7 +69,15 @@ class StorageGlobal {
*/
public function getStorageInfo($storageId) {
if (!isset($this->cache[$storageId])) {
- $this->loadForStorageIds([$storageId]);
+ $builder = $this->connection->getQueryBuilder();
+ $query = $builder->select(['id', 'numeric_id', 'available', 'last_checked'])
+ ->from('storages')
+ ->where($builder->expr()->eq('id', $builder->createNamedParameter($storageId)));
+
+ $row = $query->execute()->fetch();
+ if ($row) {
+ $this->cache[$storageId] = $row;
+ }
}
return isset($this->cache[$storageId]) ? $this->cache[$storageId] : null;
}