aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/setup/postgresql.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-01-23 11:13:47 +0100
committerJoas Schilling <nickvergessen@gmx.de>2015-01-23 14:52:21 +0100
commit039397bd3104d92f7957263520eab0ccfb54f869 (patch)
treebf87c547f087ba08cea035de5a881c35b2f4c9e3 /lib/private/setup/postgresql.php
parentc61e9f391273e5f7f4b7aa91ee4174d47402cae9 (diff)
downloadnextcloud-server-039397bd3104d92f7957263520eab0ccfb54f869.tar.gz
nextcloud-server-039397bd3104d92f7957263520eab0ccfb54f869.zip
Use setConfigs() instead of calling setConfig() multiple times
Diffstat (limited to 'lib/private/setup/postgresql.php')
-rw-r--r--lib/private/setup/postgresql.php19
1 files changed, 7 insertions, 12 deletions
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);