diff options
Diffstat (limited to 'lib/private/Setup/AbstractDatabase.php')
-rw-r--r-- | lib/private/Setup/AbstractDatabase.php | 5 |
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); } |