From 72af1407237f716282308c9288e7e7170343376e Mon Sep 17 00:00:00 2001 From: Alex Harpin Date: Sat, 19 Jun 2021 19:56:54 +0100 Subject: 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 --- core/Controller/SetupController.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'core/Controller') 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')); -- cgit v1.2.3