mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
N°9144 - fix both UI setup wizard and CLI unattended + replace production by ITOP_DEFAULT_ENV
This commit is contained in:
@@ -31,7 +31,7 @@ class InstallationFileService
|
||||
* @param bool $bInstallationOptionalChoicesChecked : this option is used only when no extensions are selected (ie empty
|
||||
* $aSelectedExtensions)
|
||||
*/
|
||||
public function __construct(string $sInstallationPath, string $sTargetEnvironment = 'production', array $aSelectedExtensions = [], bool $bInstallationOptionalChoicesChecked = true)
|
||||
public function __construct(string $sInstallationPath, string $sTargetEnvironment = ITOP_DEFAULT_ENV, array $aSelectedExtensions = [], bool $bInstallationOptionalChoicesChecked = true)
|
||||
{
|
||||
$this->sInstallationPath = $sInstallationPath;
|
||||
$this->aSelectedModules = [];
|
||||
|
||||
@@ -56,7 +56,7 @@ $sMode = $oParams->Get('mode');
|
||||
|
||||
$sTargetEnvironment = $oParams->Get('target_env', '');
|
||||
if ($sTargetEnvironment == '') {
|
||||
$sTargetEnvironment = 'production';
|
||||
$sTargetEnvironment = ITOP_DEFAULT_ENV;
|
||||
}
|
||||
|
||||
$sXmlSetupBaseName = basename($sParamFile);
|
||||
@@ -218,7 +218,7 @@ if ($sMode == 'install') {
|
||||
//use settings from itop conf
|
||||
$sTargetEnvironment = $oParams->Get('target_env', '');
|
||||
if ($sTargetEnvironment == '') {
|
||||
$sTargetEnvironment = 'production';
|
||||
$sTargetEnvironment = ITOP_DEFAULT_ENV;
|
||||
}
|
||||
$sTargetDir = APPROOT.'env-'.$sTargetEnvironment;
|
||||
}
|
||||
@@ -271,6 +271,10 @@ $bFoundIssues = false;
|
||||
|
||||
$bInstall = utils::ReadParam('install', true, true /* CLI allowed */);
|
||||
if ($bInstall) {
|
||||
if (! isset($_SESSION)) {
|
||||
$_SESSION = [];
|
||||
}
|
||||
|
||||
echo "Starting the unattended installation...\n";
|
||||
$oWizard = new DataAuditSequencer($oParams);
|
||||
$bRes = $oWizard->ExecuteAllSteps();
|
||||
|
||||
Reference in New Issue
Block a user