diff options
author | Simon L <szaimen@e.mail.de> | 2023-01-18 19:53:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 19:53:02 +0100 |
commit | 06a572ff55b193f51930571c5bb686787f709c67 (patch) | |
tree | 5c6a609dec0b2ddc68280aea60937cfbcabdacef /core | |
parent | c5a01695d141b80fc1b5802e629ede8044658d57 (diff) | |
parent | 644df591b138d28b1631ecc13ebe600c16a909f1 (diff) | |
download | nextcloud-server-06a572ff55b193f51930571c5bb686787f709c67.tar.gz nextcloud-server-06a572ff55b193f51930571c5bb686787f709c67.zip |
Merge pull request #27492 from cyclops8456/feature/24301-remove-can-install-on-occ-maintenance-install
Remove the CAN_INSTALL file when occ maintenance:install is complete
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/Maintenance/Install.php | 3 | ||||
-rw-r--r-- | core/Controller/SetupController.php | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php index c445f2c2f46..d53cd867b06 100644 --- a/core/Command/Maintenance/Install.php +++ b/core/Command/Maintenance/Install.php @@ -107,6 +107,9 @@ class Install extends Command { $this->printErrors($output, $errors); return 1; } + if ($setupHelper->shouldRemoveCanInstallFile()) { + $output->writeln('<warn>Could not remove CAN_INSTALL from the config folder. Please remove this file manually.</warn>'); + } $output->writeln("Nextcloud was successfully installed"); return 0; } diff --git a/core/Controller/SetupController.php b/core/Controller/SetupController.php index ab8b1973bf2..cdab39edf84 100644 --- a/core/Controller/SetupController.php +++ b/core/Controller/SetupController.php @@ -59,7 +59,7 @@ class SetupController { $post['dbpass'] = $post['dbpassword']; } - if (!is_file(\OC::$configDir.'/CAN_INSTALL')) { + if (!$this->setupHelper->canInstallFileExists()) { $this->displaySetupForbidden(); return; } @@ -107,10 +107,8 @@ class SetupController { } \OC::$server->getIntegrityCodeChecker()->runInstanceVerification(); - if (\OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL')) { - if (!unlink(\OC::$configDir.'/CAN_INSTALL')) { - \OC_Template::printGuestPage('', 'installation_incomplete'); - } + if ($this->setupHelper->shouldRemoveCanInstallFile()) { + \OC_Template::printGuestPage('', 'installation_incomplete'); } header('Location: ' . \OC::$server->getURLGenerator()->getAbsoluteURL('index.php/core/apps/recommended')); |