summaryrefslogtreecommitdiffstats
path: root/lib/private/Setup/AbstractDatabase.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-07-12 13:50:54 +0200
committerRobin Appelman <icewind@owncloud.com>2016-07-12 14:38:24 +0200
commit7ffda5d10fa8831f65e42b327bbb56f847b68888 (patch)
treee3adaafbf669383f2f80f8a87c8dfc644385b2f9 /lib/private/Setup/AbstractDatabase.php
parent8a79d314cf544cf2ca261cbac7ea07570e9ed8e5 (diff)
downloadnextcloud-server-7ffda5d10fa8831f65e42b327bbb56f847b68888.tar.gz
nextcloud-server-7ffda5d10fa8831f65e42b327bbb56f847b68888.zip
use pdo for postgres setup
Diffstat (limited to 'lib/private/Setup/AbstractDatabase.php')
-rw-r--r--lib/private/Setup/AbstractDatabase.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php
index 62e9b2e823f..8dee96b1ba5 100644
--- a/lib/private/Setup/AbstractDatabase.php
+++ b/lib/private/Setup/AbstractDatabase.php
@@ -101,10 +101,10 @@ abstract class AbstractDatabase {
}
/**
+ * @param array $configOverwrite
* @return \OC\DB\Connection
- * @throws \OC\DatabaseSetupException
*/
- protected function connect() {
+ protected function connect(array $configOverwrite = []) {
$systemConfig = $this->config->getSystemConfig();
$cf = new ConnectionFactory();
$connectionParams = $cf->createConnectionParams($systemConfig);
@@ -115,6 +115,7 @@ abstract class AbstractDatabase {
if (!$connectionParams['password']) {
$connectionParams['password'] = $this->dbPassword;
}
+ $connectionParams = array_merge($connectionParams, $configOverwrite);
return $cf->getConnection($systemConfig->getValue('dbtype', 'sqlite'), $connectionParams);
}