Browse Source
Merge pull request #8219 from nextcloud/fix-overwrite-url-on-cli-install
Fix proper overwrite URL on CLI install
pull/8315/merge
Morris Jobke
9 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
3 deletions
-
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); |
|
|
|
|