summaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-01-07 10:26:00 +0100
committerMorris Jobke <hey@morrisjobke.de>2016-01-07 14:54:55 +0100
commit190cc2bb6762c5f505e1e90bd582caa4fecb9cce (patch)
treee758dbc6da9f106d07146838507988b6a7d9bda1 /lib/private/files
parentfddece9552a4b194cdce8c3916e33fa8597c9008 (diff)
downloadnextcloud-server-190cc2bb6762c5f505e1e90bd582caa4fecb9cce.tar.gz
nextcloud-server-190cc2bb6762c5f505e1e90bd582caa4fecb9cce.zip
Remove OC_DB::getConnection
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/cache/storage.php4
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'];