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/PostgreSQL.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/PostgreSQL.php')
-rw-r--r-- | lib/private/Setup/PostgreSQL.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/private/Setup/PostgreSQL.php b/lib/private/Setup/PostgreSQL.php index c01e5bc0332..be3ac007493 100644 --- a/lib/private/Setup/PostgreSQL.php +++ b/lib/private/Setup/PostgreSQL.php @@ -35,7 +35,6 @@ class PostgreSQL extends AbstractDatabase { public $dbprettyname = 'PostgreSQL'; public function setupDatabase($username) { - $systemConfig = $this->config->getSystemConfig(); try { $connection = $this->connect([ 'dbname' => 'postgres' @@ -67,7 +66,7 @@ class PostgreSQL extends AbstractDatabase { $this->createDBUser($connection); } - $systemConfig->setValues([ + $this->config->setValues([ 'dbuser' => $this->dbUser, 'dbpassword' => $this->dbPassword, ]); @@ -84,15 +83,15 @@ class PostgreSQL extends AbstractDatabase { $this->logger->logException($e); $this->logger->warning('Error trying to connect as "postgres", assuming database is setup and tables need to be created'); $tablesSetup = false; - $systemConfig->setValues([ + $this->config->setValues([ 'dbuser' => $this->dbUser, 'dbpassword' => $this->dbPassword, ]); } // connect to the ownCloud database (dbname=$this->dbname) and check if it needs to be filled - $this->dbUser = $systemConfig->getValue('dbuser'); - $this->dbPassword = $systemConfig->getValue('dbpassword'); + $this->dbUser = $this->config->getValue('dbuser'); + $this->dbPassword = $this->config->getValue('dbpassword'); $connection = $this->connect(); try { $connection->connect(); |