mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
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: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
8d57d68846
commit
4ee539fde8
1 changed files with 8 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue