summaryrefslogtreecommitdiffstats
path: root/lib/private/setup.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.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.php')
-rw-r--r--lib/private/setup.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/private/setup.php b/lib/private/setup.php
index b9ba8d906c2..e5f84d4c02a 100644
--- a/lib/private/setup.php
+++ b/lib/private/setup.php
@@ -176,18 +176,19 @@ class OC_Setup {
//generate a random salt that is used to salt the local user passwords
$salt = \OC::$server->getSecureRandom()->getLowStrengthGenerator()->generate(30);
- \OC::$server->getConfig()->setSystemValue('passwordsalt', $salt);
-
// generate a secret
$secret = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate(48);
- \OC::$server->getConfig()->setSystemValue('secret', $secret);
//write the config file
- \OC::$server->getConfig()->setSystemValue('trusted_domains', $trustedDomains);
- \OC::$server->getConfig()->setSystemValue('datadirectory', $dataDir);
- \OC::$server->getConfig()->setSystemValue('overwrite.cli.url', \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost() . OC::$WEBROOT);
- \OC::$server->getConfig()->setSystemValue('dbtype', $dbType);
- \OC::$server->getConfig()->setSystemValue('version', implode('.', OC_Util::getVersion()));
+ \OC::$server->getConfig()->setSystemValues([
+ 'passwordsalt' => $salt,
+ 'secret' => $secret,
+ 'trusted_domains' => $trustedDomains,
+ 'datadirectory' => $dataDir,
+ 'overwrite.cli.url' => \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost() . OC::$WEBROOT,
+ 'dbtype' => $dbType,
+ 'version' => implode('.', OC_Util::getVersion()),
+ ]);
try {
$dbSetup->initialize($options);