mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 22:48:45 +02:00
Compare commits
1 Commits
develop
...
issue/8542
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2dba253d1 |
@@ -279,11 +279,24 @@ try {
|
|||||||
$oRuntimeEnv = new RunTimeEnvironment('production', true);
|
$oRuntimeEnv = new RunTimeEnvironment('production', true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SetupLog::Info('Move to production starts...');
|
|
||||||
$sAuthent = utils::ReadParam('authent', '', false, 'raw_data');
|
$sAuthent = utils::ReadParam('authent', '', false, 'raw_data');
|
||||||
if (!file_exists(APPROOT.'data/hub/compile_authent') || $sAuthent !== file_get_contents(APPROOT.'data/hub/compile_authent')) {
|
if (!file_exists(APPROOT.'data/hub/compile_authent') || $sAuthent !== file_get_contents(APPROOT.'data/hub/compile_authent')) {
|
||||||
throw new SecurityException(Dict::S('iTopHub:FailAuthent'));
|
throw new SecurityException(Dict::S('iTopHub:FailAuthent'));
|
||||||
}
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
if (file_exists(APPROOT.'data/hub/compile_authent')) {
|
||||||
|
unlink(APPROOT.'data/hub/compile_authent');
|
||||||
|
}
|
||||||
|
// Note: at this point, the dictionnary is not necessarily loaded
|
||||||
|
SetupLog::Error(get_class($e).': '.Dict::S('iTopHub:ConfigurationSafelyReverted')."\n".$e->getMessage());
|
||||||
|
SetupLog::Error('Debug trace: '.$e->getTraceAsString());
|
||||||
|
ReportError($e->getMessage(), $e->getCode());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
SetupLog::Info('Move to production starts...');
|
||||||
|
|
||||||
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);
|
||||||
|
|||||||
Reference in New Issue
Block a user