Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Controller/SetupController.php')
-rw-r--r--core/Controller/SetupController.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/core/Controller/SetupController.php b/core/Controller/SetupController.php
index 7449717831b..704a2507b5a 100644
--- a/core/Controller/SetupController.php
+++ b/core/Controller/SetupController.php
@@ -29,7 +29,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-
namespace OC\Core\Controller;
use OC\Setup;
@@ -44,7 +43,7 @@ class SetupController {
/**
* @param Setup $setupHelper
*/
- function __construct(Setup $setupHelper) {
+ public function __construct(Setup $setupHelper) {
$this->autoConfigFile = \OC::$configDir.'autoconfig.php';
$this->setupHelper = $setupHelper;
}
@@ -70,12 +69,12 @@ class SetupController {
return;
}
- if(isset($post['install']) AND $post['install']=='true') {
+ if (isset($post['install']) and $post['install'] == 'true') {
// We have to launch the installation process :
$e = $this->setupHelper->install($post);
$errors = ['errors' => $e];
- if(count($e) > 0) {
+ if (count($e) > 0) {
$options = array_merge($opts, $post, $errors);
$this->display($options);
} else {
@@ -104,12 +103,11 @@ class SetupController {
];
$parameters = array_merge($defaults, $post);
- \OC_Util::addScript('setup');
\OC_Template::printGuestPage('', 'installation', $parameters);
}
private function finishSetup(bool $installRecommended) {
- if( file_exists( $this->autoConfigFile )) {
+ if (file_exists($this->autoConfigFile)) {
unlink($this->autoConfigFile);
}
\OC::$server->getIntegrityCodeChecker()->runInstanceVerification();
@@ -130,18 +128,18 @@ class SetupController {
}
public function loadAutoConfig($post) {
- if( file_exists($this->autoConfigFile)) {
+ if (file_exists($this->autoConfigFile)) {
\OCP\Util::writeLog('core', 'Autoconfig file found, setting up Nextcloud…', ILogger::INFO);
$AUTOCONFIG = [];
include $this->autoConfigFile;
- $post = array_merge ($post, $AUTOCONFIG);
+ $post = array_merge($post, $AUTOCONFIG);
}
$dbIsSet = isset($post['dbtype']);
$directoryIsSet = isset($post['directory']);
$adminAccountIsSet = isset($post['adminlogin']);
- if ($dbIsSet AND $directoryIsSet AND $adminAccountIsSet) {
+ if ($dbIsSet and $directoryIsSet and $adminAccountIsSet) {
$post['install'] = 'true';
}
$post['dbIsSet'] = $dbIsSet;