From edd55b0ea9c13273695bf95d913f4dfc03e08c95 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 17 Mar 2017 16:37:48 -0600 Subject: Use SystemConfig instead of AllConfig for DB stuff * preparation for followup PRs to clean up the DB bootstrapping Signed-off-by: Morris Jobke --- lib/private/Setup/PostgreSQL.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/private/Setup/PostgreSQL.php') 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(); -- cgit v1.2.3