diff options
Diffstat (limited to 'core/Controller/SetupController.php')
-rw-r--r-- | core/Controller/SetupController.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/Controller/SetupController.php b/core/Controller/SetupController.php index b9d561cb4c9..3dd02fc31dc 100644 --- a/core/Controller/SetupController.php +++ b/core/Controller/SetupController.php @@ -62,6 +62,11 @@ class SetupController { $post['dbpass'] = $post['dbpassword']; } + if (!is_file(\OC::$configDir.'/CAN_INSTALL')) { + $this->displaySetupForbidden(); + return; + } + if(isset($post['install']) AND $post['install']=='true') { // We have to launch the installation process : $e = $this->setupHelper->install($post); @@ -79,6 +84,10 @@ class SetupController { } } + private function displaySetupForbidden() { + \OC_Template::printGuestPage('', 'installation_forbidden'); + } + public function display($post) { $defaults = array( 'adminlogin' => '', @@ -101,6 +110,13 @@ class SetupController { unlink($this->autoConfigFile); } \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'); + } + } + \OC_Util::redirectToDefaultPage(); } |