diff --git a/setup/StepSequencer.php b/setup/StepSequencer.php index 5ba057085..a29cb2f56 100644 --- a/setup/StepSequencer.php +++ b/setup/StepSequencer.php @@ -1,6 +1,7 @@ GetTargetEnv(); @@ -218,11 +215,9 @@ class ApplicationInstallSequencer extends StepSequencer $bUseSymbolicLinks ); - $sNextStep = 'db-schema'; $sNextStepLabel = 'Updating database schema'; - $aResult = [ 'status' => self::OK, 'message' => '', @@ -477,7 +472,6 @@ class ApplicationInstallSequencer extends StepSequencer $bIsAlreadyInMaintenanceMode = SetupUtils::IsInMaintenanceMode(); - if (($sEnvironment == 'production') && !$bIsAlreadyInMaintenanceMode) { $sConfigFilePath = utils::GetConfigFilePath($sEnvironment); if (is_file($sConfigFilePath)) { @@ -486,7 +480,7 @@ class ApplicationInstallSequencer extends StepSequencer SetupUtils::EnterMaintenanceMode($oConfig); } } - try{ + try { if (!is_dir($sTargetPath)) { if (!mkdir($sTargetPath)) { throw new Exception("Failed to create directory '$sTargetPath', please check the rights of the web server"); @@ -546,8 +540,7 @@ class ApplicationInstallSequencer extends StepSequencer $sCacheDir = APPROOT.'/data/cache-'.$sEnvironment.'/'; SetupUtils::builddir($sCacheDir); SetupUtils::tidydir($sCacheDir); - } - catch(Exception $e){ + } catch (Exception $e) { if (($sEnvironment == 'production') && !$bIsAlreadyInMaintenanceMode) { SetupUtils::ExitMaintenanceMode(); } @@ -606,9 +599,6 @@ class ApplicationInstallSequencer extends StepSequencer return $aModelInfo; } - - - protected function IsSetupDataAuditEnabled($sSkipDataAudit, array $aParamValues): bool { if ($sSkipDataAudit === "checked") { @@ -1004,7 +994,6 @@ class DataAuditSequencer extends ApplicationInstallSequencer { public const DATA_AUDIT_FAILED = 100; - protected function GetTempEnv() { $sTargetEnv = $this->GetTargetEnv(); @@ -1062,7 +1051,6 @@ class DataAuditSequencer extends ApplicationInstallSequencer break; - case 'compile': $aSelectedModules = $this->oParams->Get('selected_modules'); $sSourceDir = $this->oParams->Get('source_dir', 'datamodels/latest'); @@ -1105,7 +1093,7 @@ class DataAuditSequencer extends ApplicationInstallSequencer 'percentage-completed' => 80, ]; break; - case 'cleanup' ; + case 'cleanup' : $this->DoCleanup(); $aResult = [ 'status' => self::OK, @@ -1158,8 +1146,8 @@ class DataAuditSequencer extends ApplicationInstallSequencer return $aResult; } - - protected function DoWriteConfig(){ + protected function DoWriteConfig() + { $sConfigFilePath = utils::GetConfigFilePath($this->GetTargetEnv()); if (is_file($sConfigFilePath)) { $oConfig = new Config($sConfigFilePath); @@ -1194,7 +1182,8 @@ class DataAuditSequencer extends ApplicationInstallSequencer } } - protected function DoCleanup(){ + protected function DoCleanup() + { $sDestination = APPROOT.$this->GetTargetDir(); SetupUtils::tidydir($sDestination); SetupUtils::rmdir_safe($sDestination); diff --git a/setup/wizardcontroller.class.inc.php b/setup/wizardcontroller.class.inc.php index 2f472e850..80c771873 100644 --- a/setup/wizardcontroller.class.inc.php +++ b/setup/wizardcontroller.class.inc.php @@ -172,7 +172,7 @@ class WizardController /** @var \WizardStep $oStep */ $oStep = new $sCurrentStepClass($this, $sCurrentState); if ($oStep->ValidateParams()) { - if($oStep->CanComeBack()) { + if ($oStep->CanComeBack()) { $this->PushStep(['class' => $sCurrentStepClass, 'state' => $sCurrentState]); } $aPossibleSteps = $oStep->GetPossibleSteps(); @@ -386,4 +386,3 @@ on the page's parameters return $sOutput; } } - diff --git a/setup/wizardsteps/AbstractWizStepInstall.php b/setup/wizardsteps/AbstractWizStepInstall.php index c9f9ac4d6..bd4394ddb 100644 --- a/setup/wizardsteps/AbstractWizStepInstall.php +++ b/setup/wizardsteps/AbstractWizStepInstall.php @@ -1,6 +1,7 @@ add_ready_script( <<oWizard->GetParameter('mode', 'install'); if ($sMode == 'install') { return ['class' => 'WizStepSummary', 'state' => '']; - } - else { + } else { return ['class' => 'WizStepDataAudit', 'state' => '']; } diff --git a/setup/wizardsteps/WizStepSummary.php b/setup/wizardsteps/WizStepSummary.php index 30d2e8ad2..0acaf28cd 100644 --- a/setup/wizardsteps/WizStepSummary.php +++ b/setup/wizardsteps/WizStepSummary.php @@ -1,4 +1,5 @@ oWizard->GetParameter('mode', 'install'); @@ -203,7 +202,6 @@ class WizStepSummary extends AbstractWizStepInstall } } - $aBackupChecks = SetupUtils::CheckBackupPrerequisites($sDBBackupPath, $sMySQLBinDir); $bCanBackup = true; $sMySQLDumpMessage = ''; @@ -244,8 +242,6 @@ JS ); } - - /** * Tells whether the "Next" button should be enabled interactively * @return string A piece of javascript code returning either true or false diff --git a/setup/wizardsteps/WizStepUpgradeMiscParams.php b/setup/wizardsteps/WizStepUpgradeMiscParams.php index e0e95e8bb..82a88d8c9 100644 --- a/setup/wizardsteps/WizStepUpgradeMiscParams.php +++ b/setup/wizardsteps/WizStepUpgradeMiscParams.php @@ -1,4 +1,5 @@