HOR-2689 Removed references to G::LoadClass, Bootstrap::LoadClass and various references to class loading methods and require_once

This commit is contained in:
Chloe Deguzman
2017-02-14 21:24:08 +00:00
committed by davidcallizaya
parent d72b7aa561
commit 60efcf7ac7
461 changed files with 289 additions and 3170 deletions

View File

@@ -393,7 +393,6 @@ class ActionsByEmail
if ($dataRes = $resultRes->getRow()) {
if (is_null($dataRes['DEL_FINISH_DATE'])) {
\G::LoadClass('spool');
$emailServer = new \ProcessMaker\BusinessModel\EmailServer();
$criteria = $emailServer->getEmailServerCriteria();
@@ -577,7 +576,6 @@ class ActionsByEmail
$resultD->next();
$configuration = $resultD->getRow();
\G::LoadClass('pmDynaform');
$field = new \stdClass();
$obj = new \pmDynaform($configuration);
@@ -669,7 +667,6 @@ class ActionsByEmail
/*----------------------------------********---------------------------------*/
//SSO
if (\PMLicensedFeatures::getSingleton()->verifyfeature('x4TTzlISnp2K2tnSTJoMC8rTDRMTjlhMCtZeXV0QnNCLzU=')) {
\G::LoadClass('pmSso');
$sso = new \pmSsoClass();

View File

@@ -374,7 +374,6 @@ class Cases
try {
$solrEnabled = 0;
if (($solrEnv = \System::solrEnv()) !== false) {
\G::LoadClass("AppSolr");
$appSolr = new \AppSolr(
$solrEnv["solr_enabled"],
$solrEnv["solr_host"],
@@ -388,7 +387,6 @@ class Cases
}
if ($solrEnabled == 1) {
try {
\G::LoadClass("searchIndex");
$arrayData = array();
$delegationIndexes = array();
$columsToInclude = array("APP_UID");
@@ -463,7 +461,6 @@ class Cases
if (!isset($row)) {
continue;
}
\G::LoadClass('wsBase');
$ws = new \wsBase();
$fields = $ws->getCaseInfo($applicationUid, $row["DEL_INDEX"]);
$array = json_decode(json_encode($fields), true);
@@ -677,7 +674,7 @@ class Cases
public function addCase($processUid, $taskUid, $userUid, $variables)
{
try {
\G::LoadClass('wsBase');
$ws = new \wsBase();
if ($variables) {
$variables = array_shift($variables);
@@ -721,7 +718,7 @@ class Cases
public function addCaseImpersonate($processUid, $userUid, $taskUid, $variables)
{
try {
\G::LoadClass('wsBase');
$ws = new \wsBase();
if ($variables) {
$variables = array_shift($variables);
@@ -776,7 +773,7 @@ class Cases
if (!$delIndex) {
$delIndex = \AppDelegation::getCurrentIndex($applicationUid);
}
\G::LoadClass('wsBase');
$ws = new \wsBase();
$fields = $ws->reassignCase($userUid, $applicationUid, $delIndex, $userUidSource, $userUidTarget);
$array = json_decode(json_encode($fields), true);
@@ -1068,7 +1065,7 @@ class Cases
throw (new \Exception(\G::LoadTranslation("ID_CASE_ALREADY_DERIVATED")));
}
}
\G::LoadClass('wsBase');
$ws = new \wsBase();
$fields = $ws->derivateCase($userUid, $applicationUid, $delIndex, $bExecuteTriggersBeforeAssignment = false);
$array = json_decode(json_encode($fields), true);
@@ -1095,7 +1092,7 @@ class Cases
*/
public function getAllUploadedDocumentsCriteria($sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID)
{
\G::LoadClass("configuration");
$conf = new \Configurations();
$confEnvSetting = $conf->getFormats();
@@ -1374,7 +1371,7 @@ class Cases
// Get input documents added/modified by a supervisor - End
global $_DBArray;
$_DBArray['inputDocuments'] = $aInputDocuments;
\G::LoadClass('ArrayPeer');
$oCriteria = new \Criteria('dbarray');
$oCriteria->setDBArrayTable('inputDocuments');
$oCriteria->addDescendingOrderByColumn('CREATE_DATE');
@@ -1393,7 +1390,7 @@ class Cases
*/
public function getAllGeneratedDocumentsCriteria($sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID)
{
\G::LoadClass("configuration");
$conf = new \Configurations();
$confEnvSetting = $conf->getFormats();
@@ -1602,7 +1599,7 @@ class Cases
}
global $_DBArray;
$_DBArray['outputDocuments'] = $aOutputDocuments;
\G::LoadClass('ArrayPeer');
$oCriteria = new \Criteria('dbarray');
$oCriteria->setDBArrayTable('outputDocuments');
$oCriteria->addDescendingOrderByColumn('CREATE_DATE');
@@ -1691,7 +1688,7 @@ class Cases
$arrayCaseVariable = [];
if (!is_null($dynaFormUid)) {
\G::LoadClass("pmDynaform");
$data["CURRENT_DYNAFORM"] = $dynaFormUid;
$pmDynaForm = new \pmDynaform($data);
$arrayDynaFormData = $pmDynaForm->getDynaform();

View File

@@ -178,7 +178,6 @@ class ChangeLog
private function loadPermissions($APP_UID, $PRO_UID, $TAS_UID)
{
G::LoadClass('case');
$oCase = new Cases();
$this->permissions = $oCase->getAllObjects(
$PRO_UID, $APP_UID, $TAS_UID, $_SESSION['USER_LOGGED']

View File

@@ -410,7 +410,7 @@ class InputDocument
try {
$sApplicationUID = $applicationUid;
$sUserUID = $userUid;
\G::LoadClass('case');
$oCase = new \Cases();
$fields = $oCase->loadCase( $sApplicationUID );
$sProcessUID = $fields['PRO_UID'];
@@ -698,7 +698,7 @@ class InputDocument
if (is_null( $oAppDocument ) || $oAppDocument->getAppDocStatus() == 'DELETED') {
throw new \Exception(\G::LoadTranslation("ID_CASES_INPUT_DOES_NOT_EXIST", array($inputDocumentUid)));
}
\G::LoadClass('wsBase');
$ws = new \wsBase();
$ws->removeDocument($inputDocumentUid);
} catch (\Exception $e) {
@@ -753,7 +753,7 @@ class InputDocument
\G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
die();
}
\G::LoadClass("case");
$appDocUid = \G::generateUniqueID();
$docVersion = '';
$appDocType = 'INPUT';

View File

@@ -200,7 +200,7 @@ class OutputDocument
public function getCasesOutputDocuments($applicationUid, $userUid)
{
try {
\G::LoadClass('case');
$oCase = new \Cases();
$fields = $oCase->loadCase( $applicationUid );
$sProcessUID = $fields['PRO_UID'];
@@ -244,7 +244,7 @@ class OutputDocument
try {
$sApplicationUID = $applicationUid;
$sUserUID = $userUid;
\G::LoadClass('case');
$oCase = new \Cases();
$fields = $oCase->loadCase( $sApplicationUID );
$sProcessUID = $fields['PRO_UID'];
@@ -442,7 +442,7 @@ class OutputDocument
$outputID = $outputDocumentUid;
$g = new \G();
$g->sessionVarSave();
\G::LoadClass( 'case' );
$oCase = new \Cases();
$oCase->thisIsTheCurrentUser( $sApplication, $index, $sUserLogged, '', 'casesListExtJs' );
//require_once 'classes/model/OutputDocument.php';
@@ -526,7 +526,7 @@ class OutputDocument
$this->generate( $outputID, $Fields['APP_DATA'], $pathOutput, $sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean) $aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'], $aProperties , $applicationUid);
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
//G::LoadClass('plugin');
$oPluginRegistry = & \PMPluginRegistry::getSingleton();
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( 'uploadDocumentData' )) {
$triggerDetail = $oPluginRegistry->getTriggerInfo( PM_UPLOAD_DOCUMENT );

View File

@@ -69,8 +69,6 @@ class Consolidated
*/
public function postDerivate($app_uid, $app_number, $del_index, $usr_uid, $fieldName = '', $fieldValue = '')
{
G::LoadClass("wsBase");
G::LoadClass("case");
$ws = new \wsBase();
$oCase = new \Cases();
@@ -251,11 +249,6 @@ class Consolidated
$dropdownList = isset($_REQUEST ["dropList"]) ? G::json_decode($_REQUEST ["dropList"]) : array();
try {
G::LoadClass("pmFunctions");
G::LoadClass("BasePeer");
G::LoadClass("configuration");
G::LoadClass("case");
G::LoadClass("reportTables");
$response = array();
$searchFields = array();
@@ -461,9 +454,6 @@ class Consolidated
*/
public function getDataGenerate($pro_uid, $tas_uid, $dyn_uid)
{
G::LoadClass('case');
G::LoadClass('pmFunctions');
G::LoadClass("configuration");
$hasTextArea = false;
$conf = new \Configurations();
@@ -477,7 +467,6 @@ class Consolidated
$oDyna = new \Dynaform();
$dataTask = $oDyna->load($dyn_uid);
if ($dataTask['DYN_VERSION'] > 0) {
G::LoadClass("pmDynaform");
$_SESSION['PROCESS'] = $pro_uid;
$pmDyna = new \pmDynaform(array('APP_DATA' => array(), "CURRENT_DYNAFORM" => $dyn_uid));
$json = G::json_decode($dataTask["DYN_CONTENT"]);
@@ -1042,8 +1031,6 @@ class Consolidated
*/
function consolidatedUpdate($dynaformUid, $dataUpdate, $usr_uid)
{
G::LoadClass("case");
G::LoadClass("pmFunctions");
$delIndex = 1;
$oCase = new \Cases();

View File

@@ -155,8 +155,7 @@ class Dashboard {
public function getListDashboards($options = array())
{
Validator::isArray($options, '$options');
G::LoadClass("dashboards");
$dir = isset( $options["dir"] ) ? $options["dir"] : "DESC";
$sort = isset( $options["sort"] ) ? $options["sort"] : "DASHBOARD.DAS_TITLE";
$start = isset( $options["start"] ) ? $options["start"] : "0";
@@ -173,7 +172,6 @@ class Dashboard {
$limit = (int)$limit;
$limit = abs($limit);
if ($limit == 0) {
G::LoadClass("configuration");
$conf = new \Configurations();
$configList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
if (isset($configList['casesListRowNumber'])) {
@@ -228,8 +226,7 @@ class Dashboard {
public function getOwnerByDasUid($options = array())
{
Validator::isArray($options, '$options');
G::LoadClass("dashboards");
$das_uid = isset( $options["das_uid"] ) ? $options["das_uid"] : "";
$start = isset( $options["start"] ) ? $options["start"] : "0";
$limit = isset( $options["limit"] ) ? $options["limit"] : "";
@@ -245,7 +242,6 @@ class Dashboard {
$limit = (int)$limit;
$limit = abs($limit);
if ($limit == 0) {
G::LoadClass("configuration");
$conf = new \Configurations();
$configList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
if (isset($configList['casesListRowNumber'])) {

View File

@@ -61,7 +61,6 @@ class DataBaseConnection
$dbs_uid = $this->validateDbsUid($dbs_uid, $pro_uid);
}
G::LoadClass( 'dbConnections' );
$dbs = new dbConnections($pro_uid);
$oDBConnection = new DbSource();
$aFields = $oDBConnection->load($dbs_uid, $pro_uid);
@@ -123,7 +122,6 @@ class DataBaseConnection
$dbs_uid = $this->validateDbsUid($dbs_uid, $pro_uid);
}
G::LoadClass('dbConnections');
$oDBSource = new DbSource();
$oContent = new \Content();
$dataDBConnection = array_change_key_case($dataDBConnection, CASE_UPPER);
@@ -272,8 +270,6 @@ class DataBaseConnection
$flagTns = ($dataCon["DBS_TYPE"] == "oracle" && $dataCon["DBS_CONNECTION_TYPE"] == "TNS")? 1 : 0;
G::LoadClass( 'net' );
if ($flagTns == 0) {
$Server = new \NET($dataCon['DBS_SERVER']);
@@ -427,9 +423,6 @@ class DataBaseConnection
*/
public function getDbEngines ()
{
if (!class_exists('dbConnections')) {
G::LoadClass('dbConnections');
}
$dbs = new dbConnections();
$dbServices = $dbs->getDbServicesAvailables();
return $dbServices;

View File

@@ -104,8 +104,6 @@ class EmailServer
public function sendTestMail(array $arrayData)
{
try {
\G::LoadClass("system");
\G::LoadClass("spool");
$aConfiguration = array(
"MESS_ENGINE" => $arrayData["MESS_ENGINE"],
@@ -201,8 +199,6 @@ class EmailServer
public function testConnectionByStep(array $arrayData, $step = 0)
{
try {
\G::LoadClass("net");
\G::LoadThirdParty("phpmailer", "class.smtp");
//MAIL
if ($arrayData["MESS_ENGINE"] == "MAIL") {

View File

@@ -377,8 +377,7 @@ class InputDocument
$arrayData["INP_DOC_UID"] = $inputDocumentUid;
$result = $inputDocument->update($arrayData);
\G::LoadClass('pmDynaform');
$pmDynaform = new \pmDynaform();
$pmDynaform->synchronizeInputDocument($processUid, $arrayData);

View File

@@ -234,8 +234,6 @@ class Light
*/
public function getCasesListHistory($app_uid)
{
G::LoadClass( 'case' );
G::LoadClass( "BasePeer" );
//global $G_PUBLISH;
$c = $this->getTransferHistoryCriteria( $app_uid );
@@ -525,7 +523,7 @@ class Light
if (!$delIndex) {
$delIndex = \AppDelegation::getCurrentIndex($applicationUid);
}
\G::LoadClass('wsBase');
$ws = new \wsBase();
$fields = $ws->derivateCase($userUid, $applicationUid, $delIndex, $bExecuteTriggersBeforeAssignment = false, $tasks);
$array = json_decode(json_encode($fields), true);
@@ -780,9 +778,7 @@ class Light
$_SESSION["USERNAME_PREVIOUS2"] = $usernamePrevious2;
/*----------------------------------********---------------------------------*/
if (!class_exists('pmLicenseManager')) {
G::LoadClass('pmLicenseManager');
}
$licenseManager =& \pmLicenseManager::getSingleton();
if (in_array(md5($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
$G_PUBLISH = new \Publisher();
@@ -1088,7 +1084,7 @@ class Light
case 'search':
//in search action, the query to obtain all process is too slow, so we need to query directly to
//process and content tables, and for that reason we need the current language in AppCacheView.
G::loadClass( 'configuration' );
$oConf = new \Configurations();
$oConf->loadConfig( $x, 'APP_CACHE_VIEW_ENGINE', '', '', '', '' );
$appCacheViewEngine = $oConf->aConfig;
@@ -1166,9 +1162,7 @@ class Light
*/
public function getUsersToReassign($usr_uid, $task_uid)
{
//G::LoadClass( 'tasks' );
G::LoadSystem( 'rbac' );
G::LoadClass( 'memcached' );
$memcache = \PMmemcached::getSingleton( SYS_SYS );
$RBAC = \RBAC::getSingleton( PATH_DATA, session_id() );
$RBAC->sSystem = 'PROCESSMAKER';

View File

@@ -262,7 +262,6 @@ class Tracker
$arrayDynaFormData = $dynaForm->Load($obj_uid);
if (isset($arrayDynaFormData["DYN_VERSION"]) && $arrayDynaFormData["DYN_VERSION"] == 2) {
\G::LoadClass("pmDynaform");
$Fields["PRO_UID"] = $pro_uid;
$Fields["CURRENT_DYNAFORM"] = $obj_uid;
@@ -276,7 +275,7 @@ class Tracker
}
break;
case 'INPUT_DOCUMENT':
//G::LoadClass( 'case' );
$oCase = new \Cases();
$c = $oCase->getAllUploadedDocumentsCriteriaTracker( $pro_uid, $app_uid, $obj_uid );
@@ -297,7 +296,7 @@ class Tracker
break;
case 'OUTPUT_DOCUMENT':
//G::LoadClass( 'case' );
$oCase = new \Cases();
$c = $oCase->getAllGeneratedDocumentsCriteriaTracker( $pro_uid, $app_uid, $obj_uid );
$response = $c;

View File

@@ -165,7 +165,6 @@ class Lists {
$filters["limit"] = (int)$filters["limit"];
$filters["limit"] = abs($filters["limit"]);
if ($filters["limit"] == 0) {
G::LoadClass("configuration");
$conf = new \Configurations();
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
if (isset($generalConfCasesList['casesListRowNumber'])) {

View File

@@ -366,7 +366,6 @@ class MessageApplication
public function catchMessageEvent($frontEnd = false)
{
try {
\G::LoadClass("wsBase");
//Set variables
$ws = new \wsBase();

View File

@@ -77,7 +77,6 @@ class ExportObjects
public function processMigrablePlugins()
{
\G::LoadClass("pluginRegistry");
$plugins = array();
$registry = \PMPluginRegistry::getSingleton();
$data = $registry->getPluginsData();

View File

@@ -15,7 +15,6 @@ class PluginMigratorAdapter implements Exportable, Importable
*/
public function __construct($pluginName)
{
\G::LoadClass('pluginRegistry');
$registry = \PMPluginRegistry::getSingleton();
$plugin = $registry->getPluginByCode($pluginName);
require_once (

View File

@@ -318,11 +318,9 @@ class OutputDocument
public function deleteOutputDocument($sProcessUID, $sOutputDocumentUID)
{
try {
require_once(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "OutputDocument.php");
require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "ObjectPermission.php");
require_once(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "Step.php");
$this->throwExceptionIfItsAssignedInOtherObjects($sOutputDocumentUID, "outputDocumentUid");
\G::LoadClass( 'processMap' );
$oOutputDocument = new \OutputDocument();
$fields = $oOutputDocument->load( $sOutputDocumentUID );
$oOutputDocument->remove( $sOutputDocumentUID );

View File

@@ -356,7 +356,6 @@ class Pmgmail {
error_log(G::LoadTranslation('ID_EMAIL_ENGINE_IS_NOT_ENABLED'));
return false;
}
\G::LoadClass("wsBase");
$ws = new \wsBase();
$resultMail = $ws->sendMessage(

View File

@@ -454,7 +454,6 @@ class Process
public function throwExceptionIfNotExistsRoutingScreenTemplate($processUid, $fileName, $fieldNameForException)
{
try {
\G::LoadClass("processes");
$arrayFile = \Processes::getProcessFiles($processUid, "mail");
$flag = 0;
@@ -719,7 +718,6 @@ class Process
}
if ($delete || $type == "SEQUENTIAL" || $type == "SEC-JOIN" || $type == "DISCRIMINATOR") {
//\G::LoadClass("tasks");
$tasks = new \Tasks();
@@ -1201,8 +1199,7 @@ class Process
public function deleteProcess($sProcessUID)
{
try {
G::LoadClass('case');
G::LoadClass('reportTables');
//Instance all classes necesaries
$oProcess = new Process();
$oDynaform = new Dynaform();
@@ -1625,9 +1622,6 @@ class Process
//Verify data
$this->throwExceptionIfNotExistsProcess($processUid, $this->arrayFieldNameForException["processUid"]);
//Get data
\G::LoadClass("triggerLibrary");
$triggerWizard = new \ProcessMaker\BusinessModel\TriggerWizard();
$triggerWizard->setFormatFieldNameInUppercase($this->formatFieldNameInUppercase);
$triggerWizard->setArrayFieldNameForException($this->arrayFieldNameForException);

View File

@@ -31,8 +31,6 @@ class ProcessPermissions
$op_uid = $this->validateOpUid($op_uid);
}
G::LoadClass('case');
$aObjectsPermissions = array();
$oCriteria = new \Criteria('workflow');
$oCriteria->add(ObjectPermissionPeer::PRO_UID, $pro_uid);

View File

@@ -135,7 +135,6 @@ class ProjectUser
}
foreach($usersIds as $value) {
\G::LoadClass( 'case' );
$oCase = new \Cases();
$startTasks = $oCase->getStartCases( $value );
foreach ($startTasks as $task) {
@@ -178,7 +177,6 @@ class ProjectUser
Validator::proUid($sProcessUID, '$prj_uid');
Validator::usrUid($sUserUID, '$usr_uid');
$aUsers = array();
\G::LoadClass( 'case' );
$oCase = new \Cases();
$startTasks = $oCase->getStartCases($sUserUID);
if (sizeof($startTasks) > 1) {
@@ -240,10 +238,7 @@ class ProjectUser
$fields['version'] = $result->version;
$fields['time_stamp'] = $result->timestamp;
$messageCode = 1;
\G::LoadClass( 'Task' );
\G::LoadClass( 'User' );
\G::LoadClass( 'TaskUser' );
\G::LoadClass( 'Groupwf' );
/**
* note added by gustavo cruz gustavo-at-colosa-dot-com
* This is a little check to see if the GroupUser class has been declared or not.
@@ -252,9 +247,7 @@ class ProjectUser
* I recomend that in some way check already if a imported class is declared
* somewhere else or maybe delegate the task to the G Class LoadClass method.
*/
if (! class_exists( 'GroupUser' )) {
\G::LoadClass( 'GroupUser' );
}
// if the user has been authenticated, then check if has the rights or
// permissions to create the webentry
if ($result->status_code == 0) {

View File

@@ -19,7 +19,6 @@ class ReportingIndicators
*/
public function getHistoricData($indicatorUid, $initDate, $endDate, $periodicity, $language)
{
G::loadClass('indicatorsCalculator');
$retval = "";
$calculator = new \IndicatorsCalculator();
$arr = $calculator->indicatorData($indicatorUid);
@@ -53,7 +52,6 @@ class ReportingIndicators
*/
public function getPeiCompleteData($indicatorUid, $compareDate, $measureDate, $language)
{
G::loadClass('indicatorsCalculator');
$calculator = new \IndicatorsCalculator();
$processes = $calculator->peiProcesses($indicatorUid, $measureDate, $measureDate, $language);
$arr = $calculator->indicatorData($indicatorUid);
@@ -85,7 +83,6 @@ class ReportingIndicators
*/
public function getUeiCompleteData($indicatorUid, $compareDate, $measureDate,$language)
{
G::loadClass('indicatorsCalculator');
$calculator = new \IndicatorsCalculator();
$groups = $calculator->ueiUserGroups($indicatorUid, $measureDate, $measureDate, $language);
@@ -118,7 +115,6 @@ class ReportingIndicators
*/
public function getUeiGroupsStatistics($groupId, $initDate, $endDate, $language)
{
G::loadClass('indicatorsCalculator');
$calculator = new \IndicatorsCalculator();
$retval = $calculator->groupEmployeesData($groupId, $initDate, $endDate, $language);
return $retval;
@@ -136,152 +132,11 @@ class ReportingIndicators
*/
public function getPeiTasksStatistics($processList, $initDate, $endDate, $language)
{
G::loadClass('indicatorsCalculator');
$calculator = new \IndicatorsCalculator();
$retval = $calculator->peiTasks($processList, $initDate, $endDate, $language);
return $retval;
}
// /**
// * Lists tasks of a employee and it's statistics (efficiency, average times, etc.)
// *
// * @param array $employeeList array with the list of employeees to filter the results.
// * @param DateTime $initDate date from the index will be calculated
// * @param DateTime $endDate date until the index will be calculated
// *
// * return decimal value
// */
// public function getEmployeeTasksInfoList($employeeList, $initDate, $endDate, $language)
// {
// G::loadClass('IndicatorsCalculator');
// $calculator = new \IndicatorsCalculator();
// $retval = $calculator->employeeTasksInfoList($employeeList, $initDate, $endDate, $language);
// return $retval;
// }
//
// /**
// * Returns the percent of Cases with Overdue time
// *
// * @param array $processList array with the list of processes to filter the results.
// * @param DateTime $initDate date from the index will be calculated
// * @param DateTime $endDate date until the index will be calculated
// *
// * return decimal value
// */
// public function getPercentOverdueCasesByProcess($processList, $initDate, $endDate)
// {
// G::loadClass('IndicatorsCalculator');
// $calculator = new \IndicatorsCalculator();
// $retval = $calculator->percentOverdueCasesByProcess($processList, $initDate, $endDate);
// return $retval;
// }
//
// /**
// * Returns the percent of Cases with Overdue by period (month, semester, etc.)
// *
// * @param array $processList array with the list of processes to filter the results.
// * @param DateTime $initDate date from the index will be calculated
// * @param DateTime $endDate date until the index will be calculated
// *
// * return decimal value
// */
// public function getPercentOverdueCasesByProcessHistory($processList, $initDate, $endDate, $periodicity)
// {
// G::loadClass('IndicatorsCalculator');
// $calculator = new \IndicatorsCalculator();
// $retval = $calculator->percentOverdueCasesByProcessList($processList, $initDate, $endDate, \ReportingPeriodicityEnum::fromValue($periodicity));
// return $retval;
// }
//
// /**
// * Returns the number of new Cases
// *
// * @param array $processList array with the list of processes to filter the results.
// * @param DateTime $initDate date from the index will be calculated
// * @param DateTime $endDate date until the index will be calculated
// *
// * return decimal value
// */
// public function getPercentNewCasesByProcess($processList, $initDate, $endDate)
// {
// G::loadClass('IndicatorsCalculator');
// $calculator = new \IndicatorsCalculator();
// $retval = $calculator->totalNewCasesByProcess($processList, $initDate, $endDate);
// return $retval;
// }
//
// /**
// * Returns the total of new Cases historically
// *
// * @param array $processList array with the list of processes to filter the results.
// * @param DateTime $initDate date from the index will be calculated
// * @param DateTime $endDate date until the index will be calculated
// *
// * return decimal value
// */
// public function getPercentNewCasesByProcessHistory($processList, $initDate, $endDate, $periodicity)
// {
// G::loadClass('IndicatorsCalculator');
// $calculator = new \IndicatorsCalculator();
// $retval = $calculator->totalNewCasesByProcessList($processList, $initDate, $endDate, \ReportingPeriodicityEnum::fromValue($periodicity));
// return $retval;
// }
//
//
//
//
// /**
// * Returns the number of completed Cases
// *
// * @param array $processList array with the list of processes to filter the results.
// * @param DateTime $initDate date from the index will be calculated
// * @param DateTime $endDate date until the index will be calculated
// *
// * return decimal value
// */
// public function getPercentCompletedCasesByProcess($processList, $initDate, $endDate)
// {
// G::loadClass('IndicatorsCalculator');
// $calculator = new \IndicatorsCalculator();
// $retval = $calculator->totalCompletedCasesByProcess($processList, $initDate, $endDate);
// return $retval;
// }
//
// /**
// * Returns the total of completed Cases historically
// *
// * @param array $processList array with the list of processes to filter the results.
// * @param DateTime $initDate date from the index will be calculated
// * @param DateTime $endDate date until the index will be calculated
// *
// * return decimal value
// */
// public function getPercentCompletedCasesByProcessHistory($processList, $initDate, $endDate, $periodicity)
// {
// G::loadClass('IndicatorsCalculator');
// $calculator = new \IndicatorsCalculator();
// $retval = $calculator->totalCompletedCasesByProcessList($processList, $initDate, $endDate, \ReportingPeriodicityEnum::fromValue($periodicity));
// return $retval;
// }
// /**
// *
// *
// * @param array $processList array with the list of processes to filter the results.
// * @param DateTime $initDate date from the index will be calculated
// * @param DateTime $endDate date until the index will be calculated
// *
// * return decimal value
// */
// public function getProcessEfficiencyIndexData($processId, $initDate, $endDate)
// {
// G::loadClass('IndicatorsCalculator');
// $calculator = new \IndicatorsCalculator();
// $indexValue = $calculator->processEfficiencyIndex ($processId, $initDate, $endDate);
// $costValue = $calculator->processEfficiencyCost ($processId, $initDate, $endDate);
// $retval = $calculator->totalCompletedCasesByProcessList($processId, $initDate, $endDate);
// return $retval;
// }
/**
* Lists tasks of a process and it's statistics (efficiency, average times, etc.)
*
@@ -295,7 +150,6 @@ class ReportingIndicators
*/
public function getGeneralIndicatorStatistics($indicatorId, $initDate, $endDate, $periodicity)
{
G::loadClass('indicatorsCalculator');
$calculator = new \IndicatorsCalculator();
$arr = $calculator->generalIndicatorData($indicatorId, $initDate, $endDate, \ReportingPeriodicityEnum::NONE);
$value = $arr[0]['value'];
@@ -340,7 +194,6 @@ class ReportingIndicators
$usrUid = isset( $options["usrUid"] ) ? $options["usrUid"] : "";
G::loadClass('indicatorsCalculator');
$calculator = new \IndicatorsCalculator();
$result = $calculator->statusIndicator($usrUid);
return $result;

View File

@@ -124,7 +124,6 @@ class Table
if ($validate) {
$pro_uid = $this->validateProUid($pro_uid);
$rep_uid = $this->validateTabUid($rep_uid);
G::loadClass('pmTable');
}
$additionalTables = new AdditionalTables();
@@ -728,7 +727,6 @@ class Table
*/
public function getDynafields ($pro_uid, $rep_tab_type, $rep_tab_grid = '')
{
G::LoadClass( 'reportTables' );
$dynFields = array();
$aFields = array();
@@ -1106,8 +1104,6 @@ class Table
break;
}
G::loadClass('pmTable');
$columnsTypes = \PmTable::getPropelSupportedColumnTypes();
$res = array_search($fld_type, $columnsTypes);
if ($res === false) {

View File

@@ -109,9 +109,6 @@ class Task
$prj_uid = $this->validateProUid($prj_uid);
$taskUid = $this->validateActUid($act_uid);
//G::LoadClass("configuration");
require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.configuration.php");
$task = new \Task();
$arrayDataAux = $task->load($taskUid);
@@ -421,7 +418,6 @@ class Task
}
//Additional configuration
if (isset($arrayProperty["TAS_DEF_MESSAGE_TYPE"])) {
\G::LoadClass("configuration");
$oConf = new \Configurations();
if (!isset($arrayProperty["TAS_DEF_MESSAGE_TEMPLATE"])) {
$arrayProperty["TAS_DEF_MESSAGE_TEMPLATE"] = "alert_message.html";
@@ -473,7 +469,6 @@ class Task
$result = $task->update($arrayProperty);
if (!empty($arrayProperty['CONSOLIDATE_DATA'])) {
if (!empty($arrayProperty['CONSOLIDATE_DATA']['consolidated_dynaform'])) {
G::LoadClass("consolidatedCases");
$consolidated = new \ConsolidatedCases();
$dataConso = array(
'con_status' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_enable'],
@@ -514,7 +509,6 @@ class Task
$prj_uid = $this->validateProUid($prj_uid);
$act_uid = $this->validateActUid($act_uid);
G::LoadClass('tasks');
$tasks = new \Tasks();
$tasks->deleteTask($act_uid);
} catch (Exception $e) {
@@ -720,8 +714,6 @@ class Task
public function getUsers($taskUid, $taskUserType, $keyCaseToLower = false)
{
try {
//G::LoadClass("BasePeer");
require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.BasePeer.php");
$arrayData = array();
$keyCase = ($keyCaseToLower)? CASE_LOWER : CASE_UPPER;

View File

@@ -1209,7 +1209,6 @@ class TimerEvent
public function startContinueCaseByTimerEvent($datetime, $frontEnd = false)
{
try {
\G::LoadClass("wsBase");
//Set variables
$ws = new \wsBase();

View File

@@ -170,7 +170,6 @@ class Trigger
isset($dataTrigger["TRI_WEBBOT"])
) {
//Check disabled code
\G::LoadClass("codeScanner");
$cs = new \CodeScanner(SYS_SYS);

View File

@@ -37,7 +37,6 @@ class TriggerWizard
}
//Library
\G::LoadClass("triggerLibrary");
$this->library = \triggerLibrary::getSingleton();
} catch (\Exception $e) {

View File

@@ -608,7 +608,6 @@ class User
//Save Calendar assigment
if (isset($arrayData["USR_CALENDAR"])) {
//Save Calendar ID for this user
\G::LoadClass("calendar");
$calendar = new \Calendar();
$calendar->assignCalendarTo($arrayData["USR_UID"], $arrayData["USR_CALENDAR"], "USER");
@@ -804,7 +803,6 @@ class User
//Save Calendar assigment
if (isset($arrayData["USR_CALENDAR"])) {
//Save Calendar ID for this user
\G::LoadClass("calendar");
$calendar = new \Calendar();
$calendar->assignCalendarTo($userUid, $arrayData["USR_CALENDAR"], "USER");
@@ -1085,7 +1083,6 @@ class User
//Verify data
$this->throwExceptionIfNotExistsUser($usrUid, $this->arrayFieldNameForException["usrUid"]);
\G::LoadClass('case');
$oProcessMap = new \Cases();
$USR_UID = $usrUid;
$total = 0;
@@ -1102,10 +1099,8 @@ class User
throw new \Exception(\G::LoadTranslation("ID_USER_CAN_NOT_BE_DELETED", array($USR_UID)));
} else {
$UID = $usrUid;
\G::LoadClass('tasks');
$oTasks = new \Tasks();
$oTasks->ofToAssignUserOfAllTasks($UID);
\G::LoadClass('groups');
$oGroups = new \Groups();
$oGroups->removeUserOfAllGroups($UID);
$this->changeUserStatus($UID, 'CLOSED');

View File

@@ -195,7 +195,7 @@ class Variable
"VAR_SQL" => $variable->getVarSql(),
"VAR_ACCEPTED_VALUES" => $variable->getVarAcceptedValues()
);
\G::LoadClass('pmDynaform');
$pmDynaform = new \pmDynaform();
$pmDynaform->synchronizeVariable($processUid, $newVariable, $oldVariable);
} else {
@@ -239,7 +239,7 @@ class Variable
$this->throwExceptionIfVariableIsAssociatedAditionalTable($variableUid);
$variable = $this->getVariable($processUid, $variableUid);
\G::LoadClass('pmDynaform');
$pmDynaform = new \pmDynaform();
$isUsed = $pmDynaform->isUsed($processUid, $variable);
if ($isUsed !== false) {

View File

@@ -407,7 +407,6 @@ class WebEntry
$fileContent .= "\$_SESSION[\"CURRENT_DYN_UID\"] = \"" . $dynaFormUid . "\";\n";
$fileContent .= "\$G_PUBLISH = new Publisher();\n";
$fileContent .= "G::LoadClass(\"pmDynaform\");\n";
$fileContent .= "\$a = new pmDynaform(array(\"CURRENT_DYNAFORM\" => \"" . $arrayWebEntryData["DYN_UID"] . "\"));\n";
$fileContent .= "if (\$a->isResponsive()) {\n";
$fileContent .= " \$a->printWebEntry(\"" . $fileName . "Post.php\");\n";

View File

@@ -92,7 +92,6 @@ class Workflow extends Handler
// Save Calendar ID for this process
if (! empty($data["PRO_CALENDAR"])) {
//G::LoadClass( "calendar" );
$calendar = new \Calendar();
$calendar->assignCalendarTo($this->proUid, $data["PRO_CALENDAR"], 'PROCESS');
}
@@ -581,8 +580,6 @@ class Workflow extends Handler
public function deleteProcess($sProcessUID, $flagRemoveCases = true, $onlyDiagram = false)
{
try {
//G::LoadClass('case');
//G::LoadClass('reportTables');
//Instance all classes necesaries
$oProcess = new \Process();

View File

@@ -866,7 +866,7 @@ class Light extends Api
$_SESSION['PROCESS'] = $prj_uid;
$response = $process->getDynaForms($prj_uid);
$result = $this->parserDataDynaForm($response);
\G::LoadClass("pmDynaform");
$pmDynaForm = new \pmDynaform();
foreach ($result as $k => $form) {
$result[$k]['formContent'] = (isset($form['formContent']) && $form['formContent'] != null)?json_decode($form['formContent']):"";
@@ -1033,7 +1033,7 @@ class Light extends Api
$response = $dynaForm->getDynaForm($dyn_uid);
$result = $this->parserDataDynaForm($response);
$result['formContent'] = (isset($result['formContent']) && $result['formContent'] != null) ? \G::json_decode($result['formContent']) : "";
\G::LoadClass("pmDynaform");
$pmDynaForm = new \pmDynaform(["CURRENT_DYNAFORM" => $dyn_uid]);
$pmDynaForm->jsonr($result['formContent']);
return $result;
@@ -1053,7 +1053,7 @@ class Light extends Api
try {
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
$dynaForm->setFormatFieldNameInUppercase(false);
\G::LoadClass("pmDynaform");
$_SESSION['PROCESS'] = $prj_uid;
$return = array();
foreach ($request_data['formId'] as $dyn_uid) {

View File

@@ -127,7 +127,7 @@ class DynaForm extends Api
public function doGetDynaFormLanguage($dyn_uid, $prj_uid, $lang)
{
try {
\G::LoadClass('pmDynaform');
$pmDynaform = new \pmDynaform();
return $pmDynaform->downloadLanguage($dyn_uid, $lang);
} catch (\Exception $e) {
@@ -144,7 +144,7 @@ class DynaForm extends Api
public function doPostDynaFormLanguage($dyn_uid, $prj_uid)
{
try {
\G::LoadClass('pmDynaform');
$pmDynaform = new \pmDynaform();
$pmDynaform->uploadLanguage($dyn_uid);
} catch (\Exception $e) {
@@ -161,7 +161,7 @@ class DynaForm extends Api
public function doDeleteDynaFormLanguage($dyn_uid, $prj_uid, $lang)
{
try {
\G::LoadClass('pmDynaform');
$pmDynaform = new \pmDynaform();
$pmDynaform->deleteLanguage($dyn_uid, $lang);
} catch (\Exception $e) {
@@ -178,7 +178,7 @@ class DynaForm extends Api
public function doGetListDynaFormLanguage($dyn_uid, $prj_uid)
{
try {
\G::LoadClass('pmDynaform');
$pmDynaform = new \pmDynaform();
return $pmDynaform->listLanguage($dyn_uid);
} catch (\Exception $e) {