diff --git a/setup/extensionsmap.class.inc.php b/setup/extensionsmap.class.inc.php index de53d11c4..a187df516 100644 --- a/setup/extensionsmap.class.inc.php +++ b/setup/extensionsmap.class.inc.php @@ -379,11 +379,9 @@ class iTopExtensionsMap { $aRes = []; foreach ($this->GetAllExtensionsWithPreviouslyInstalled() as $oExtension) { - \IssueLog::Error($oExtension->sCode.' '.__METHOD__.__LINE__); /** @var \iTopExtension $oExtension */ if (($oExtension->sSource !== iTopExtension::SOURCE_WIZARD) && ($oExtension->bVisible)) { if ($bKeepMissingDependencyExtensions || (count($oExtension->aMissingDependencies) == 0)) { - if (!$oExtension->bMandatory) { $oExtension->bMandatory = ($oExtension->sSource === iTopExtension::SOURCE_REMOTE); } diff --git a/setup/wizardsteps.class.inc.php b/setup/wizardsteps.class.inc.php index bb0918dbd..fab3c92b8 100644 --- a/setup/wizardsteps.class.inc.php +++ b/setup/wizardsteps.class.inc.php @@ -1325,6 +1325,8 @@ class WizStepModulesChoice extends WizardStep */ protected iTopExtensionsMap $oExtensionsMap; + private ?array $aSteps = null; + protected PhpExpressionEvaluator $oPhpExpressionEvaluator; /** @@ -1370,15 +1372,11 @@ class WizStepModulesChoice extends WizardStep } } - public function GetTitle() + public function GetTitle(): string { - if (@file_exists($this->GetSourceFilePath())) { - // Found an "installation.xml" file, let's use this definition for the wizard - return 'Extensions'; - } + $aStepInfo = $this->GetStepInfo(); - // No wizard configuration provided, build a standard one with just one big list. All items are mandatory, only works when there are no conflicted modules. - return 'Modules Selection'; + return $aStepInfo['title'] ?? 'Modules selection'; } public function GetPossibleSteps() @@ -1893,51 +1891,44 @@ EOF protected function GetStepInfo($idx = null) { - $aStepInfo = null; - if ($idx === null) { - $index = $this->GetStepIndex(); - } else { - $index = $idx; - } + $index = $idx ?? $this->GetStepIndex(); - $aSteps = []; - $this->oWizard->SetParameter('additional_extensions_modules', json_encode([])); // Default value, no additional extensions + if (is_null($this->aSteps)) { + $this->aSteps = []; + $this->oWizard->SetParameter('additional_extensions_modules', json_encode([])); // Default value, no additional extensions - $aOptions = $this->oExtensionsMap->GetAllExtensionsOptionInfo(); - if (@file_exists($this->GetSourceFilePath())) { - // Found an "installation.xml" file, let's use this definition for the wizard - $aParams = new XMLParameters($this->GetSourceFilePath()); - $aSteps = $aParams->Get('steps', []); + $aOptions = $this->oExtensionsMap->GetAllExtensionsOptionInfo(); + if (@file_exists($this->GetSourceFilePath())) { + // Found an "installation.xml" file, let's use this definition for the wizard + $aParams = new XMLParameters($this->GetSourceFilePath()); + $this->aSteps = $aParams->Get('steps', []); - // Additional step for the "extensions" - $aStepDefinition = [ - 'title' => 'Extensions', - 'description' => '