Skip to content
Snippets Groups Projects
Unverified Commit 4ee539fd authored by Morris Jobke's avatar Morris Jobke
Browse files

Fix proper overwrite URL on CLI install


* regression from #7835

Steps

* having a my.config.php with a proper `overwrite.cli.url` and `htaccess.RewriteBase` set
* install with this
* before: short URLs where broken and you need to call `occ maintenance:update:htaccess` additionally to fix this
* after: occ install results in a proper htaccess like on stable13

Signed-off-by: default avatarMorris Jobke <hey@morrisjobke.de>
parent 8d57d688
No related branches found
No related tags found
No related merge requests found
...@@ -325,15 +325,20 @@ class Setup { ...@@ -325,15 +325,20 @@ class Setup {
$secret = $this->random->generate(48); $secret = $this->random->generate(48);
//write the config file //write the config file
$this->config->setValues([ $newConfigValues = [
'passwordsalt' => $salt, 'passwordsalt' => $salt,
'secret' => $secret, 'secret' => $secret,
'trusted_domains' => $trustedDomains, 'trusted_domains' => $trustedDomains,
'datadirectory' => $dataDir, 'datadirectory' => $dataDir,
'overwrite.cli.url' => $request->getServerProtocol() . '://' . $request->getInsecureServerHost() . \OC::$WEBROOT,
'dbtype' => $dbType, 'dbtype' => $dbType,
'version' => implode('.', \OCP\Util::getVersion()), '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 { try {
$dbSetup->initialize($options); $dbSetup->initialize($options);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment