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

@@ -149,9 +149,9 @@ try {
if (is_subclass_of($sClass, 'WizardStep')) {
/** @var WizardStep $oStep */
$oStep = new $sClass($oDummyController, $sState);
$sConfigFile = utils::GetConfigFilePath();
$sConfigFile = utils::GetConfigFilePath(ITOP_DEFAULT_ENV);
if (file_exists($sConfigFile) && !is_writable($sConfigFile) && $oStep->RequiresWritableConfig()) {
$sRelativePath = utils::GetConfigFilePathRelative();
$sRelativePath = utils::GetConfigFilePathRelative(ITOP_DEFAULT_ENV);
$oPage->error("<b>Error:</b> the configuration file '".$sRelativePath."' already exists and cannot be overwritten.");
$oPage->p("The wizard cannot modify the configuration file for you. If you want to upgrade ".ITOP_APPLICATION.", make sure that the file '<b>".$sRelativePath."</b>' can be modified by the web server.");
$oPage->output();