Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-11-10 18:17:08 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2014-11-10 18:17:08 +0300
commit042bfabf646a1da5c64d1d29dde22829a311648b (patch)
treebfafcc776d885b6b4352592e7bf805c125ed9365 /lib/private/db.php
parente9ebbcb47e75213bc2ea0f62b94229cc089a6119 (diff)
Ensure there is a connection object within \OC_DB::enableCaching()
Diffstat (limited to 'lib/private/db.php')
-rw-r--r--lib/private/db.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/db.php b/lib/private/db.php
index 93d8973d8c0..d58f7c3ebcb 100644
--- a/lib/private/db.php
+++ b/lib/private/db.php
@@ -423,10 +423,11 @@ class OC_DB {
* @param bool $enabled
*/
static public function enableCaching($enabled) {
+ $connection = self::getConnection();
if ($enabled) {
- self::$connection->enableQueryStatementCaching();
+ $connection->enableQueryStatementCaching();
} else {
- self::$connection->disableQueryStatementCaching();
+ $connection->disableQueryStatementCaching();
}
}