summaryrefslogtreecommitdiffstats
path: root/lib/private/files/cache
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-01-07 10:18:38 +0100
committerMorris Jobke <hey@morrisjobke.de>2016-01-07 14:54:55 +0100
commit0a41cfefe38e8bf352895f2b87dd9a04fd627094 (patch)
treeb965a0cc879ba604915a0d8b0d890888317dcf0e /lib/private/files/cache
parent3917d888bde42336abb1d2ecbef04ae7530e5c14 (diff)
downloadnextcloud-server-0a41cfefe38e8bf352895f2b87dd9a04fd627094.tar.gz
nextcloud-server-0a41cfefe38e8bf352895f2b87dd9a04fd627094.zip
Remove beginTransaction, commit, rollback from OC_DB
Diffstat (limited to 'lib/private/files/cache')
-rw-r--r--lib/private/files/cache/scanner.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index 983e12d7639..88bb57d2b5c 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -336,7 +336,7 @@ class Scanner extends BasicEmitter {
$newChildren = $this->getNewChildren($path);
if ($this->useTransactions) {
- \OC_DB::beginTransaction();
+ \OC::$server->getDatabaseConnection()->beginTransaction();
}
$exceptionOccurred = false;
foreach ($newChildren as $file) {
@@ -361,7 +361,7 @@ class Scanner extends BasicEmitter {
$exceptionOccurred = true;
} catch (\OCP\Lock\LockedException $e) {
if ($this->useTransactions) {
- \OC_DB::rollback();
+ \OC::$server->getDatabaseConnection()->rollback();
}
throw $e;
}
@@ -372,7 +372,7 @@ class Scanner extends BasicEmitter {
$this->removeFromCache($child);
}
if ($this->useTransactions) {
- \OC_DB::commit();
+ \OC::$server->getDatabaseConnection()->commit();
}
if ($exceptionOccurred) {
// It might happen that the parallel scan process has already