diff options
Diffstat (limited to 'lib/private/files/cache/storage.php')
-rw-r--r-- | lib/private/files/cache/storage.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/files/cache/storage.php b/lib/private/files/cache/storage.php index e5235d1ca92..4998c622e84 100644 --- a/lib/private/files/cache/storage.php +++ b/lib/private/files/cache/storage.php @@ -58,10 +58,10 @@ class Storage { if ($row = self::getStorageById($this->storageId)) { $this->numericId = $row['numeric_id']; } else { - $connection = \OC_DB::getConnection(); + $connection = \OC::$server->getDatabaseConnection(); $available = $isAvailable ? 1 : 0; if ($connection->insertIfNotExist('*PREFIX*storages', ['id' => $this->storageId, 'available' => $available])) { - $this->numericId = \OC::$server->getDatabaseConnection()->lastInsertId('*PREFIX*storages'); + $this->numericId = $connection->lastInsertId('*PREFIX*storages'); } else { if ($row = self::getStorageById($this->storageId)) { $this->numericId = $row['numeric_id']; |