correcciones incidencias veracode
This commit is contained in:
@@ -90,6 +90,12 @@ if (!defined('PATH_HOME')) {
|
||||
$e_all = defined('E_STRICT') ? $e_all & ~E_STRICT : $e_all;
|
||||
$e_all = $config['debug'] ? $e_all : $e_all & ~E_NOTICE;
|
||||
|
||||
G::LoadSystem('inputfilter');
|
||||
$filter = new InputFilter();
|
||||
$config['debug'] = $filter->validateInput($config['debug']);
|
||||
$config['memory_limit'] = $filter->validateInput($config['memory_limit']);
|
||||
$config['wsdl_cache'] = $filter->validateInput($config['wsdl_cache'],'int');
|
||||
$config['time_zone'] = $filter->validateInput($config['time_zone']);
|
||||
// Do not change any of these settings directly, use env.ini instead
|
||||
ini_set('display_errors', $config['debug']);
|
||||
ini_set('error_reporting', $e_all);
|
||||
@@ -355,8 +361,8 @@ Bootstrap::registerClass('wsResponse', PATH_HOME . "engine/classes/clas
|
||||
|
||||
Bootstrap::registerClass("PMLicensedFeatures", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.licensedFeatures.php");
|
||||
Bootstrap::registerClass("AddonsManagerPeer", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "AddonsManagerPeer.php");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
Bootstrap::registerClass('dashboards', PATH_HOME . "engine/classes/class.dashboards.php");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
Bootstrap::registerClass('dashboards', PATH_HOME . "engine/classes/class.dashboards.php");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$arrayClass = array("Configuration", "EmailServer", "ListInbox", "ListParticipatedHistory");
|
||||
@@ -371,18 +377,18 @@ foreach ($arrayClass as $value) {
|
||||
G::LoadClass("serverConfiguration");
|
||||
G::LoadClass("dates"); //Load Criteria
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
global $dateInit;
|
||||
global $dateFinish;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
global $dateInit;
|
||||
global $dateFinish;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if (!defined('SYS_SYS')) {
|
||||
$sObject = $argv[1];
|
||||
$sNow = $argv[2];
|
||||
$dateSystem = $argv[3];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$dateInit = null;
|
||||
$dateFinish = null;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$dateInit = null;
|
||||
$dateFinish = null;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$sFilter = '';
|
||||
|
||||
@@ -527,17 +533,17 @@ function processWorkspace()
|
||||
resendEmails();
|
||||
unpauseApplications();
|
||||
calculateDuration();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
calculateAppDuration();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
calculateAppDuration();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
executeEvents($sLastExecution);
|
||||
executeScheduledCases();
|
||||
executeUpdateAppTitle();
|
||||
executeCaseSelfService();
|
||||
executePlugins();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
fillReportByUser();
|
||||
fillReportByProcess();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
fillReportByUser();
|
||||
fillReportByProcess();
|
||||
/*----------------------------------********---------------------------------*/
|
||||
} catch (Exception $oError) {
|
||||
saveLog("main", "error", "Error processing workspace : " . $oError->getMessage() . "\n");
|
||||
@@ -728,29 +734,29 @@ function calculateDuration()
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
function calculateAppDuration()
|
||||
{
|
||||
global $sFilter;
|
||||
|
||||
if ($sFilter != '' && strpos($sFilter, 'calculateapp') === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setExecutionMessage("Calculating Duration by Application");
|
||||
|
||||
try {
|
||||
$oApplication = new Application();
|
||||
$oApplication->calculateAppDuration(1);
|
||||
|
||||
setExecutionResultMessage('DONE');
|
||||
saveLog('calculateDurationByApp', 'action', 'Calculating Duration by Application');
|
||||
} catch (Exception $oError) {
|
||||
setExecutionResultMessage('WITH ERRORS', 'error');
|
||||
eprintln(" '-".$oError->getMessage(), 'red');
|
||||
saveLog('calculateDurationByApp', 'error', 'Error Calculating Duration: ' . $oError->getMessage());
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
function calculateAppDuration()
|
||||
{
|
||||
global $sFilter;
|
||||
|
||||
if ($sFilter != '' && strpos($sFilter, 'calculateapp') === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setExecutionMessage("Calculating Duration by Application");
|
||||
|
||||
try {
|
||||
$oApplication = new Application();
|
||||
$oApplication->calculateAppDuration(1);
|
||||
|
||||
setExecutionResultMessage('DONE');
|
||||
saveLog('calculateDurationByApp', 'action', 'Calculating Duration by Application');
|
||||
} catch (Exception $oError) {
|
||||
setExecutionResultMessage('WITH ERRORS', 'error');
|
||||
eprintln(" '-".$oError->getMessage(), 'red');
|
||||
saveLog('calculateDurationByApp', 'error', 'Error Calculating Duration: ' . $oError->getMessage());
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
function executeEvents($sLastExecution, $sNow=null)
|
||||
@@ -1095,66 +1101,66 @@ function setExecutionResultMessage($m, $t='')
|
||||
eprintln("[$m]", $c);
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
function fillReportByUser ()
|
||||
{
|
||||
try {
|
||||
global $sFilter;
|
||||
global $dateInit;
|
||||
global $dateFinish;
|
||||
|
||||
if (strpos($sFilter, 'report_by_user') === false) {
|
||||
return false;
|
||||
}
|
||||
if ($dateInit == null) {
|
||||
eprintln("You must enter the starting date.", "red");
|
||||
eprintln('Example: +init-date"YYYY-MM-DD HH:MM:SS" +finish-date"YYYY-MM-DD HH:MM:SS"', "red");
|
||||
return false;
|
||||
}
|
||||
|
||||
$dateFinish = ($dateFinish != null) ? $dateFinish : date("Y-m-d H:i:s");
|
||||
|
||||
$appcv = new AppCacheView();
|
||||
$appcv->setPathToAppCacheFiles( PATH_METHODS . 'setup' . PATH_SEP . 'setupSchemas' . PATH_SEP );
|
||||
setExecutionMessage("Calculating data to fill the 'User Reporting'...");
|
||||
$appcv->fillReportByUser($dateInit, $dateFinish);
|
||||
setExecutionResultMessage("DONE");
|
||||
} catch (Exception $e) {
|
||||
setExecutionResultMessage("WITH ERRORS", "error");
|
||||
eprintln(" '-" . $e->getMessage(), "red");
|
||||
saveLog("fillReportByUser", "error", "Error in fill report by user: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
function fillReportByProcess ()
|
||||
{
|
||||
try {
|
||||
global $sFilter;
|
||||
global $dateInit;
|
||||
global $dateFinish;
|
||||
|
||||
if (strpos($sFilter, 'report_by_process') === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($dateInit == null) {
|
||||
eprintln("You must enter the starting date.", "red");
|
||||
eprintln('Example: +init-date"YYYY-MM-DD HH:MM:SS" +finish-date"YYYY-MM-DD HH:MM:SS"', "red");
|
||||
return false;
|
||||
}
|
||||
|
||||
$dateFinish = ($dateFinish != null) ? $dateFinish : date("Y-m-d H:i:s");
|
||||
$appcv = new AppCacheView();
|
||||
$appcv->setPathToAppCacheFiles( PATH_METHODS . 'setup' . PATH_SEP . 'setupSchemas' . PATH_SEP );
|
||||
|
||||
setExecutionMessage("Calculating data to fill the 'Process Reporting'...");
|
||||
$appcv->fillReportByProcess($dateInit, $dateFinish);
|
||||
setExecutionResultMessage("DONE");
|
||||
} catch (Exception $e) {
|
||||
setExecutionResultMessage("WITH ERRORS", "error");
|
||||
eprintln(" '-" . $e->getMessage(), "red");
|
||||
saveLog("fillReportByProcess", "error", "Error in fill report by process: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
function fillReportByUser ()
|
||||
{
|
||||
try {
|
||||
global $sFilter;
|
||||
global $dateInit;
|
||||
global $dateFinish;
|
||||
|
||||
if (strpos($sFilter, 'report_by_user') === false) {
|
||||
return false;
|
||||
}
|
||||
if ($dateInit == null) {
|
||||
eprintln("You must enter the starting date.", "red");
|
||||
eprintln('Example: +init-date"YYYY-MM-DD HH:MM:SS" +finish-date"YYYY-MM-DD HH:MM:SS"', "red");
|
||||
return false;
|
||||
}
|
||||
|
||||
$dateFinish = ($dateFinish != null) ? $dateFinish : date("Y-m-d H:i:s");
|
||||
|
||||
$appcv = new AppCacheView();
|
||||
$appcv->setPathToAppCacheFiles( PATH_METHODS . 'setup' . PATH_SEP . 'setupSchemas' . PATH_SEP );
|
||||
setExecutionMessage("Calculating data to fill the 'User Reporting'...");
|
||||
$appcv->fillReportByUser($dateInit, $dateFinish);
|
||||
setExecutionResultMessage("DONE");
|
||||
} catch (Exception $e) {
|
||||
setExecutionResultMessage("WITH ERRORS", "error");
|
||||
eprintln(" '-" . $e->getMessage(), "red");
|
||||
saveLog("fillReportByUser", "error", "Error in fill report by user: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
function fillReportByProcess ()
|
||||
{
|
||||
try {
|
||||
global $sFilter;
|
||||
global $dateInit;
|
||||
global $dateFinish;
|
||||
|
||||
if (strpos($sFilter, 'report_by_process') === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($dateInit == null) {
|
||||
eprintln("You must enter the starting date.", "red");
|
||||
eprintln('Example: +init-date"YYYY-MM-DD HH:MM:SS" +finish-date"YYYY-MM-DD HH:MM:SS"', "red");
|
||||
return false;
|
||||
}
|
||||
|
||||
$dateFinish = ($dateFinish != null) ? $dateFinish : date("Y-m-d H:i:s");
|
||||
$appcv = new AppCacheView();
|
||||
$appcv->setPathToAppCacheFiles( PATH_METHODS . 'setup' . PATH_SEP . 'setupSchemas' . PATH_SEP );
|
||||
|
||||
setExecutionMessage("Calculating data to fill the 'Process Reporting'...");
|
||||
$appcv->fillReportByProcess($dateInit, $dateFinish);
|
||||
setExecutionResultMessage("DONE");
|
||||
} catch (Exception $e) {
|
||||
setExecutionResultMessage("WITH ERRORS", "error");
|
||||
eprintln(" '-" . $e->getMessage(), "red");
|
||||
saveLog("fillReportByProcess", "error", "Error in fill report by process: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user