From 039397bd3104d92f7957263520eab0ccfb54f869 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 23 Jan 2015 11:13:47 +0100 Subject: Use setConfigs() instead of calling setConfig() multiple times --- lib/private/setup/postgresql.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'lib/private/setup/postgresql.php') diff --git a/lib/private/setup/postgresql.php b/lib/private/setup/postgresql.php index 3777d1620bc..5fb6b85fc89 100644 --- a/lib/private/setup/postgresql.php +++ b/lib/private/setup/postgresql.php @@ -43,20 +43,15 @@ class PostgreSQL extends AbstractDatabase { $this->dbpassword=\OC_Util::generateRandomBytes(30); $this->createDBUser($connection); - - \OC_Config::setValue('dbuser', $this->dbuser); - \OC_Config::setValue('dbpassword', $this->dbpassword); - - //create the database - $this->createDatabase($connection); } - else { - \OC_Config::setValue('dbuser', $this->dbuser); - \OC_Config::setValue('dbpassword', $this->dbpassword); - //create the database - $this->createDatabase($connection); - } + \OC_Config::setValues([ + 'dbuser' => $this->dbuser, + 'dbpassword' => $this->dbpassword, + ]); + + //create the database + $this->createDatabase($connection); // the connection to dbname=postgres is not needed anymore pg_close($connection); -- cgit v1.2.3