aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-02-27 13:49:39 +0100
committerGitHub <noreply@github.com>2018-02-27 13:49:39 +0100
commit640db3d5fed6ca6d274d64842100fa7216ae1d67 (patch)
treebe6c018bd9cf8a932b1dae0eecdca351f0c687c8
parent7bc3c2e057c8c265ca7b1aa387dd1ba479690143 (diff)
parent4ee539fde8a7bb3b78e14a5f3aa94e9fbc0047d7 (diff)
downloadnextcloud-server-640db3d5fed6ca6d274d64842100fa7216ae1d67.tar.gz
nextcloud-server-640db3d5fed6ca6d274d64842100fa7216ae1d67.zip
Merge pull request #8219 from nextcloud/fix-overwrite-url-on-cli-install
Fix proper overwrite URL on CLI install
-rw-r--r--lib/private/Setup.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index c0246a83e46..212deeeba0f 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -325,15 +325,20 @@ class Setup {
$secret = $this->random->generate(48);
//write the config file
- $this->config->setValues([
+ $newConfigValues = [
'passwordsalt' => $salt,
'secret' => $secret,
'trusted_domains' => $trustedDomains,
'datadirectory' => $dataDir,
- 'overwrite.cli.url' => $request->getServerProtocol() . '://' . $request->getInsecureServerHost() . \OC::$WEBROOT,
'dbtype' => $dbType,
'version' => implode('.', \OCP\Util::getVersion()),
- ]);
+ ];
+
+ if ($this->config->getValue('overwrite.cli.url', null) === null) {
+ $newConfigValues['overwrite.cli.url'] = $request->getServerProtocol() . '://' . $request->getInsecureServerHost() . \OC::$WEBROOT;
+ }
+
+ $this->config->setValues($newConfigValues);
try {
$dbSetup->initialize($options);