Revert "N°2214 Add PHP check in CLI scripts"

This reverts commit c768e18e2b.
No risk taken for the 2.7.1 : this will be included but for 2.8 !
This commit is contained in:
Pierre Goiffon
2020-06-15 15:18:00 +02:00
parent 7bee718a13
commit 8912618732
10 changed files with 22 additions and 123 deletions

View File

@@ -60,7 +60,7 @@ function ReadMandatoryParam($oP, $sParam, $sSanitizationFilter = 'parameter')
function UsageAndExit($oP)
{
$bModeCLI = ($oP instanceof CLIPage);
$bModeCLI = utils::IsModeCLI();
if ($bModeCLI)
{
@@ -477,12 +477,9 @@ function ReorderProcesses(&$aProcesses, $aTasks, $oNow, $bVerbose, &$oP)
set_time_limit(0); // Some background actions may really take long to finish (like backup)
$bIsModeCLI = utils::IsModeCLI();
if ($bIsModeCLI)
if (utils::IsModeCLI())
{
$oP = new CLIPage("iTop - cron");
SetupUtils::CheckPhpAndExtensionsForCli($oP, EXIT_CODE_FATAL);
}
else
{
@@ -500,7 +497,7 @@ catch (Exception $e)
exit(EXIT_CODE_FATAL);
}
if ($bIsModeCLI)
if (utils::IsModeCLI())
{
// Next steps:
// specific arguments: 'csvfile'