N°2240 - Supportability - Maintenance mode

This commit is contained in:
Eric
2019-09-27 18:00:09 +02:00
parent 64434f8065
commit db0a5bd071
2 changed files with 9 additions and 2 deletions

View File

@@ -154,6 +154,8 @@ function ReportError($sMessage, $iErrorCode, $aMoreFields = array())
try
{
SetupUtils::ExitMaintenanceMode(false); // Reset maintenance mode in case of problem
utils::PushArchiveMode(false);
ini_set('max_execution_time', max(3600, ini_get('max_execution_time'))); // Under Windows SQL/backup operations are part of the PHP timeout and require extra time
@@ -307,7 +309,8 @@ try
unlink(APPROOT.'data/hub/compile_authent');
// Load the "production" config file to clone & update it
$oConfig = new Config(APPCONF.'production/'.ITOP_CONFIG_FILE);
SetupUtils::EnterMaintenanceMode($oConfig);
$oRuntimeEnv->InitDataModel($oConfig, true /* model only */);
$aAvailableModules = $oRuntimeEnv->AnalyzeInstallation($oConfig, $oRuntimeEnv->GetBuildDir(), true);
@@ -376,6 +379,10 @@ try
SetupPage::log_error('Debug trace: '.$e->getTraceAsString());
ReportError($e->getMessage(), $e->getCode());
}
finally
{
SetupUtils::ExitMaintenanceMode();
}
break;
default:

View File

@@ -255,7 +255,7 @@ function DoInstall(WebPage $oPage)
$sStatusPageUrl = utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'land.php', array('operation' => 'done'));
$aWidgetParams = array(
'self_url' => utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'ajax.php'),
'self_url' => utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'ajax.php', array('maintenance' => true)),
'iframe_url' => $sIframeUrl,
'redirect_after_completion_url' => $sStatusPageUrl,
'mysql_bindir' => MetaModel::GetConfig()->GetModuleSetting('itop-backup', 'mysql_bindir', ''),