diff options
author | Alex Harpin <development@landsofshadow.co.uk> | 2021-06-19 19:56:54 +0100 |
---|---|---|
committer | Alex Harpin <development@landsofshadow.co.uk> | 2023-01-10 11:59:06 +0000 |
commit | 72af1407237f716282308c9288e7e7170343376e (patch) | |
tree | 30ab4b4119988526a6a53cef56781b36b08062f8 /core/Controller | |
parent | 467c8a9d787b0005e05aa36154d7036b377b3221 (diff) | |
download | nextcloud-server-72af1407237f716282308c9288e7e7170343376e.tar.gz nextcloud-server-72af1407237f716282308c9288e7e7170343376e.zip |
Move CAN_INSTALL check to method and remove unlink from SetupController
Move the check for the CAN_INSTALL file in the config directory to a method in the Setup class and remove the call to unlink from the SetupController as this in now handled in the Setup class.
Signed-off-by: Alex Harpin <development@landsofshadow.co.uk>
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/SetupController.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/core/Controller/SetupController.php b/core/Controller/SetupController.php index ab8b1973bf2..b4f41b48da2 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->canInstallExists()) { $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->canInstallExists()) { + \OC_Template::printGuestPage('', 'installation_incomplete'); } header('Location: ' . \OC::$server->getURLGenerator()->getAbsoluteURL('index.php/core/apps/recommended')); |