N°9965 - Extensions management and Designer don't have the same view on extension (#1020)

* N°9965 - GetChoicesFromDatabase no more static to mock it

* N°9965 - remove empty line
This commit is contained in:
odain-cbd
2026-08-21 15:58:38 +02:00
committed by GitHub
parent 98913a2a86
commit 18b7ee4d30
2 changed files with 2 additions and 3 deletions

View File

@@ -710,7 +710,7 @@ class iTopExtensionsMap
}
}
public static function GetChoicesFromDatabase(Config $oConfig): array|false
public function GetChoicesFromDatabase(Config $oConfig): array|false
{
try {
if (CMDBSource::DBName() === null) {
@@ -739,7 +739,7 @@ class iTopExtensionsMap
*/
public function GetSelectedExtensions(Config $oConfig, array $aAddedExtensions, array $aRemovedExtensions): array
{
$aDbChoices = self::GetChoicesFromDatabase($oConfig);
$aDbChoices = $this->GetChoicesFromDatabase($oConfig);
foreach ($aDbChoices as $i => $sChoice) {
if (in_array($sChoice, $aRemovedExtensions)) {
unset($aDbChoices[$i]);

View File

@@ -74,7 +74,6 @@ class WizStepLandingBeforeAudit extends WizStepModulesChoice
// Component selection in previous screens
if ($this->oWizard->GetParameter('selected_components', '[]') === '[]') {
$aSelectedComponents = $this->GetSelectedComponents($this->aSteps, $this->oWizard->GetParameter('selected_extensions', '[]'));
$this->oWizard->SetParameter('selected_components', json_encode($aSelectedComponents));
} else {