mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-18 23:08:46 +02:00
N°2240 - Supportability - Maintenance mode
This commit is contained in:
@@ -154,6 +154,8 @@ function ReportError($sMessage, $iErrorCode, $aMoreFields = array())
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
SetupUtils::ExitMaintenanceMode(false); // Reset maintenance mode in case of problem
|
||||||
|
|
||||||
utils::PushArchiveMode(false);
|
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
|
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');
|
unlink(APPROOT.'data/hub/compile_authent');
|
||||||
// Load the "production" config file to clone & update it
|
// Load the "production" config file to clone & update it
|
||||||
$oConfig = new Config(APPCONF.'production/'.ITOP_CONFIG_FILE);
|
$oConfig = new Config(APPCONF.'production/'.ITOP_CONFIG_FILE);
|
||||||
|
SetupUtils::EnterMaintenanceMode($oConfig);
|
||||||
|
|
||||||
$oRuntimeEnv->InitDataModel($oConfig, true /* model only */);
|
$oRuntimeEnv->InitDataModel($oConfig, true /* model only */);
|
||||||
|
|
||||||
$aAvailableModules = $oRuntimeEnv->AnalyzeInstallation($oConfig, $oRuntimeEnv->GetBuildDir(), true);
|
$aAvailableModules = $oRuntimeEnv->AnalyzeInstallation($oConfig, $oRuntimeEnv->GetBuildDir(), true);
|
||||||
@@ -376,6 +379,10 @@ try
|
|||||||
SetupPage::log_error('Debug trace: '.$e->getTraceAsString());
|
SetupPage::log_error('Debug trace: '.$e->getTraceAsString());
|
||||||
ReportError($e->getMessage(), $e->getCode());
|
ReportError($e->getMessage(), $e->getCode());
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
SetupUtils::ExitMaintenanceMode();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ function DoInstall(WebPage $oPage)
|
|||||||
$sStatusPageUrl = utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'land.php', array('operation' => 'done'));
|
$sStatusPageUrl = utils::GetAbsoluteUrlModulePage('itop-hub-connector', 'land.php', array('operation' => 'done'));
|
||||||
|
|
||||||
$aWidgetParams = array(
|
$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,
|
'iframe_url' => $sIframeUrl,
|
||||||
'redirect_after_completion_url' => $sStatusPageUrl,
|
'redirect_after_completion_url' => $sStatusPageUrl,
|
||||||
'mysql_bindir' => MetaModel::GetConfig()->GetModuleSetting('itop-backup', 'mysql_bindir', ''),
|
'mysql_bindir' => MetaModel::GetConfig()->GetModuleSetting('itop-backup', 'mysql_bindir', ''),
|
||||||
|
|||||||
Reference in New Issue
Block a user