mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-18 23:08:46 +02:00
N°8632 - Various fixes (#814)
* N°8632 - Check existence of parameter file within iTop * N°8632 - block parameter file from request * log on error * PHP CS fixer * N°8632 - param files must be outside iTop * PHP CS fixer * Update webservices/export.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update tests/php-unit-tests/unitary-tests/application/utilsTest.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * ✅ Fix CI --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -199,15 +199,15 @@ function RaiseAlarm($sMessage)
|
||||
//////////
|
||||
// Main
|
||||
|
||||
try {
|
||||
utils::UseParamFile();
|
||||
} catch (Exception $e) {
|
||||
echo "Error: ".$e->GetMessage()."\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (utils::IsModeCLI()) {
|
||||
SetupUtils::CheckPhpAndExtensionsForCli(new CLIPage('Check backup utility'));
|
||||
try {
|
||||
utils::UseParamFile();
|
||||
} catch (Exception $e) {
|
||||
echo 'Error: '.$e->GetMessage()."\n";
|
||||
exit;
|
||||
}
|
||||
$oP = new CLIPage('Check backup utility');
|
||||
SetupUtils::CheckPhpAndExtensionsForCli($oP);
|
||||
|
||||
echo date('Y-m-d H:i:s')." - running check-backup utility\n";
|
||||
try {
|
||||
|
||||
@@ -88,16 +88,15 @@ if (utils::IsModeCLI()) {
|
||||
$oP = new CLIPage(GetOperationName());
|
||||
|
||||
SetupUtils::CheckPhpAndExtensionsForCli($oP);
|
||||
try {
|
||||
utils::UseParamFile();
|
||||
} catch (Exception $e) {
|
||||
ExitError($oP, $e->GetMessage());
|
||||
}
|
||||
} else {
|
||||
$oP = new WebPage(GetOperationName());
|
||||
}
|
||||
|
||||
try {
|
||||
utils::UseParamFile();
|
||||
} catch (Exception $e) {
|
||||
ExitError($oP, $e->GetMessage());
|
||||
}
|
||||
|
||||
ExecuteMainOperation($oP);
|
||||
|
||||
$oP->output();
|
||||
|
||||
Reference in New Issue
Block a user