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 /lib/private | |
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 'lib/private')
-rw-r--r-- | lib/private/Setup.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php index d1936f55f28..bd176984678 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -419,7 +419,7 @@ class Setup { //and we are done $config->setSystemValue('installed', true); - if (\OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL')) { + if (self::canInstallExists()) { unlink(\OC::$configDir.'/CAN_INSTALL'); } @@ -599,4 +599,11 @@ class Setup { 'channel' => (string)$OC_Channel, ]; } + + /** + * @return bool + */ + public function canInstallExists() { + return \OC_Util::getChannel() !== 'git' && is_file(\OC::$configDir.'/CAN_INSTALL'); + } } |