Fix: disable the connection to iTopHub when running in demo mode (restore 2018-04-10 revisions : r5634)

SVN:trunk[5631]
This commit is contained in:
Pierre Goiffon
2018-04-12 08:53:20 +00:00
parent c562098ef7
commit 757130847f
3 changed files with 64 additions and 32 deletions

View File

@@ -218,6 +218,7 @@ try
try
{
if (MetaModel::GetConfig()->Get('demo_mode')) throw new Exception('Sorry the installation of extensions is not allowed in demo mode');
SetupPage::log_info('Backup starts...');
set_time_limit(0);
$sBackupPath = APPROOT.'/data/backups/manual/backup-';
@@ -264,6 +265,7 @@ try
$oRuntimeEnv->MoveSelectedExtensions(APPROOT.'/data/downloaded-extensions/', $aSelectedExtensionDirs);
$oConfig = new Config(APPCONF.'production/'.ITOP_CONFIG_FILE);
if ($oConfig->Get('demo_mode')) throw new Exception('Sorry the installation of extensions is not allowed in demo mode');
$aSelectModules = $oRuntimeEnv->CompileFrom('production', false); // WARNING symlinks does not seem to be compatible with manual Commit