mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-16 13:58:45 +02:00
N°2240 - Supportability - Maintenance mode
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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', ''),
|
||||
|
||||
Reference in New Issue
Block a user