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 3590ddedf0
commit 93b658646b
25 changed files with 58 additions and 78 deletions

View File

@@ -290,7 +290,7 @@ class MFCompiler
} else {
$oConfig = null;
}
if (($this->sEnvironment == 'production') && !$bIsAlreadyInMaintenanceMode && $bEnterMaintenanceMode) {
if (($this->sEnvironment == ITOP_DEFAULT_ENV) && !$bIsAlreadyInMaintenanceMode && $bEnterMaintenanceMode) {
SetupUtils::EnterMaintenanceMode($oConfig);
}
if ($bUseSymbolicLinks || $bSkipTempDir) {
@@ -313,7 +313,7 @@ class MFCompiler
// Cleanup the temporary directory
SetupUtils::rrmdir($sTempTargetDir);
}
if (($this->sEnvironment == 'production') && !$bIsAlreadyInMaintenanceMode && $bEnterMaintenanceMode) {
if (($this->sEnvironment == ITOP_DEFAULT_ENV) && !$bIsAlreadyInMaintenanceMode && $bEnterMaintenanceMode) {
SetupUtils::ExitMaintenanceMode();
}
throw $e;
@@ -323,7 +323,7 @@ class MFCompiler
// Move the results to the target directory
SetupUtils::movedir($sTempTargetDir, $sFinalTargetDir);
}
if (($this->sEnvironment == 'production') && !$bIsAlreadyInMaintenanceMode && $bEnterMaintenanceMode) {
if (($this->sEnvironment == ITOP_DEFAULT_ENV) && !$bIsAlreadyInMaintenanceMode && $bEnterMaintenanceMode) {
SetupUtils::ExitMaintenanceMode();
}