diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-03-17 16:37:48 -0600 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-03-19 15:53:49 -0600 |
commit | edd55b0ea9c13273695bf95d913f4dfc03e08c95 (patch) | |
tree | 71bcb99c0d2b5fd16d97eadcc947e11488c23817 /lib/private/Setup/AbstractDatabase.php | |
parent | c02527e41462133444881817b741f91ebf563b3b (diff) | |
download | nextcloud-server-edd55b0ea9c13273695bf95d913f4dfc03e08c95.tar.gz nextcloud-server-edd55b0ea9c13273695bf95d913f4dfc03e08c95.zip |
Use SystemConfig instead of AllConfig for DB stuff
* preparation for followup PRs to clean up the DB bootstrapping
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Setup/AbstractDatabase.php')
-rw-r--r-- | lib/private/Setup/AbstractDatabase.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/Setup/AbstractDatabase.php b/lib/private/Setup/AbstractDatabase.php index dbf46888ffe..c554e569a63 100644 --- a/lib/private/Setup/AbstractDatabase.php +++ b/lib/private/Setup/AbstractDatabase.php @@ -28,7 +28,7 @@ namespace OC\Setup; use OC\AllConfig; use OC\DB\ConnectionFactory; -use OCP\IConfig; +use OC\SystemConfig; use OCP\IL10N; use OCP\ILogger; use OCP\Security\ISecureRandom; @@ -51,14 +51,14 @@ abstract class AbstractDatabase { protected $dbPort; /** @var string */ protected $tablePrefix; - /** @var AllConfig */ + /** @var SystemConfig */ protected $config; /** @var ILogger */ protected $logger; /** @var ISecureRandom */ protected $random; - public function __construct(IL10N $trans, $dbDefinitionFile, IConfig $config, ILogger $logger, ISecureRandom $random) { + public function __construct(IL10N $trans, $dbDefinitionFile, SystemConfig $config, ILogger $logger, ISecureRandom $random) { $this->trans = $trans; $this->dbDefinitionFile = $dbDefinitionFile; $this->config = $config; @@ -89,7 +89,7 @@ abstract class AbstractDatabase { $dbPort = !empty($config['dbport']) ? $config['dbport'] : ''; $dbTablePrefix = isset($config['dbtableprefix']) ? $config['dbtableprefix'] : 'oc_'; - $this->config->setSystemValues([ + $this->config->setValues([ 'dbname' => $dbName, 'dbhost' => $dbHost, 'dbport' => $dbPort, @@ -137,7 +137,7 @@ abstract class AbstractDatabase { $connectionParams = array_merge($connectionParams, $configOverwrite); $cf = new ConnectionFactory($this->config); - return $cf->getConnection($this->config->getSystemValue('dbtype', 'sqlite'), $connectionParams); + return $cf->getConnection($this->config->getValue('dbtype', 'sqlite'), $connectionParams); } /** |