diff options
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/DB/ConnectionFactory.php | 6 | ||||
-rw-r--r-- | lib/private/Server.php | 2 | ||||
-rw-r--r-- | lib/private/Setup/AbstractDatabase.php | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/DB/ConnectionFactory.php b/lib/private/DB/ConnectionFactory.php index a7aae32f670..8a1ed60b257 100644 --- a/lib/private/DB/ConnectionFactory.php +++ b/lib/private/DB/ConnectionFactory.php @@ -28,7 +28,7 @@ namespace OC\DB; use Doctrine\DBAL\Event\Listeners\OracleSessionInit; use Doctrine\DBAL\Event\Listeners\SQLSessionInit; use Doctrine\DBAL\Event\Listeners\MysqlSessionInit; -use OC\SystemConfig; +use OCP\IConfig; /** * Takes care of creating and configuring Doctrine connections. @@ -65,8 +65,8 @@ class ConnectionFactory { ), ); - public function __construct(SystemConfig $systemConfig) { - if($systemConfig->getValue('mysql.utf8mb4', false)) { + public function __construct(IConfig $config) { + if($config->getSystemValue('mysql.utf8mb4', false)) { $defaultConnectionParams['mysql']['charset'] = 'utf8mb4'; } } diff --git a/lib/private/Server.php b/lib/private/Server.php index 063ff4a3d3b..11558118d52 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -408,7 +408,7 @@ class Server extends ServerContainer implements IServerContainer { }); $this->registerService('DatabaseConnection', function (Server $c) { $systemConfig = $c->getSystemConfig(); - $factory = new \OC\DB\ConnectionFactory($systemConfig); + $factory = new \OC\DB\ConnectionFactory($c->getConfig()); $type = $systemConfig->getValue('dbtype', 'sqlite'); if (!$factory->isValidType($type)) { throw new \OC\DatabaseException('Invalid database type'); diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php index 310f74d4c0c..47c3e5ee1c6 100644 --- a/lib/private/Setup/AbstractDatabase.php +++ b/lib/private/Setup/AbstractDatabase.php @@ -134,7 +134,7 @@ abstract class AbstractDatabase { } $connectionParams = array_merge($connectionParams, $configOverwrite); - $cf = new ConnectionFactory(); + $cf = new ConnectionFactory($this->config); return $cf->getConnection($this->config->getSystemValue('dbtype', 'sqlite'), $connectionParams); } |