N°9144 - fix both UI setup wizard and CLI unattended + replace production by ITOP_DEFAULT_ENV

This commit is contained in:
odain
2026-04-03 16:17:44 +02:00
parent d36f68e3b0
commit 82a20c54a9
25 changed files with 58 additions and 78 deletions

View File

@@ -915,7 +915,7 @@ class SetupUtils
$aResult['found'] = true;
} elseif (file_exists($sDir.'/conf/production/config-itop.php')) {
$sSourceDir = $sDir;
$sSourceEnvironment = 'production';
$sSourceEnvironment = ITOP_DEFAULT_ENV;
$sConfigFile = $sDir.'/conf/production/config-itop.php';
$aResult['found'] = true;
}
@@ -1586,7 +1586,7 @@ JS
}
$oProductionEnv = new RunTimeEnvironment();
$aRemovedExtensionCodes = json_decode($oWizard->GetParameter('removed_extensions'), true) ?? [];
$oExtensionsMap = new iTopExtensionsMap('production', $aDirsToScan);
$oExtensionsMap = new iTopExtensionsMap(ITOP_DEFAULT_ENV, $aDirsToScan);
$oExtensionsMap->DeclareExtensionAsRemoved($aRemovedExtensionCodes);
$aAvailableModules = $oProductionEnv->AnalyzeInstallation($oConfig, $aDirsToScan, $bAbortOnMissingDependency, $aModulesToLoad);