summaryrefslogtreecommitdiffstats
path: root/lib/db.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-03-02 17:17:11 +0100
committerBart Visscher <bartv@thisnet.nl>2013-07-26 20:36:48 +0200
commitd7916363e1efbc15a5dba51056fb8af93330e5eb (patch)
treec63f238ecab0991134b43ac885ad71319f8116f7 /lib/db.php
parent793ff0fec9d438bfdcf63e04f1d6897cadbf7a8a (diff)
downloadnextcloud-server-d7916363e1efbc15a5dba51056fb8af93330e5eb.tar.gz
nextcloud-server-d7916363e1efbc15a5dba51056fb8af93330e5eb.zip
Make DB connection available to use for dependency injection
Diffstat (limited to 'lib/db.php')
-rw-r--r--lib/db.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/db.php b/lib/db.php
index 9270b2a1517..102782ac6ba 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -164,6 +164,11 @@ class OC_DB {
return true;
}
+ static public function getConnection() {
+ self::connect();
+ return self::$connection;
+ }
+
/**
* @brief Prepare a SQL query
* @param string $query Query string