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

@@ -305,7 +305,6 @@ class AdditionalTables extends BaseAdditionalTables
FieldsPeer::doDelete($criteria);
//remove all related to pmTable
G::loadClass('pmTable');
$pmTable = new pmTable($additionalTable['ADD_TAB_NAME']);
$pmTable->setDataSource($additionalTable['DBS_UID']);
$pmTable->remove();
@@ -585,7 +584,6 @@ class AdditionalTables extends BaseAdditionalTables
if ($oClass->validate()) {
$iResult = $oClass->save();
if ($keysAutoIncrement == 1 && $aFields[$keyUIDAutoIncrement] == '' && isset($_SESSION['APPLICATION']) && $_SESSION['APPLICATION'] != '') {
G::LoadClass('case');
$oCaseKeyAuto = new Cases();
$newId = $oClass->getId();
$aFields = $oCaseKeyAuto->loadCase($_SESSION['APPLICATION']);
@@ -849,7 +847,6 @@ class AdditionalTables extends BaseAdditionalTables
*/
public function updateReportTables($proUid, $appUid, $appNumber, $caseData, $appStatus)
{
G::loadClass('pmTable');
//get all Active Report Tables
$criteria = new Criteria('workflow');
$criteria->add(AdditionalTablesPeer::PRO_UID, $proUid);

View File

@@ -163,7 +163,6 @@ class AddonsManager extends BaseAddonsManager
public function getInstalledVersion()
{
if ($this->isCore()) {
G::LoadClass("system");
return (EnterpriseUtils::pmVersion(System::getVersion()));
} else {
if ($this->isPlugin()) {

View File

@@ -1,6 +1,5 @@
<?php
require_once 'classes/model/om/BaseAddonsStore.php';
G::LoadClass("system");
define("STORE_VERSION", 1);
class AddonsStore extends BaseAddonsStore

View File

@@ -99,8 +99,6 @@ class AppAssignSelfServiceValue extends BaseAppAssignSelfServiceValue
public function generateData()
{
try {
G::LoadClass("case");
AppAssignSelfServiceValuePeer::doDeleteAll(); //Delete all records
//Generate data

View File

@@ -303,7 +303,6 @@ class AppCacheView extends BaseAppCacheView
}
//check groups assigned to SelfService task
G::LoadClass('groups');
$group = new Groups();
$aGroups = $group->getActiveGroupsForAnUser($userUid);
@@ -335,8 +334,6 @@ class AppCacheView extends BaseAppCacheView
public function getSelfServiceCasesByEvaluate($userUid)
{
try {
G::LoadClass("groups");
$arrayAppAssignSelfServiceValueData = array();
//Get APP_UIDs
@@ -384,9 +381,6 @@ class AppCacheView extends BaseAppCacheView
public function getUnassigned($userUid, $doCount)
{
//get the valid selfservice tasks for this user
if (!class_exists('Cases')) {
G::loadClass('case');
}
$oCase = new Cases();
$tasks = $this->getSelfServiceTasks( $userUid );
@@ -1689,7 +1683,6 @@ class AppCacheView extends BaseAppCacheView
public function replaceRowUserData($rowData)
{
try {
G::loadClass('configuration');
$oConfig = new Configuration();
$aConfig = $oConfig->load('ENVIRONMENT_SETTINGS');
$aConfig = unserialize($aConfig['CFG_VALUE']);

View File

@@ -25,12 +25,6 @@
*
*/
//require_once 'classes/model/om/BaseAppDelegation.php';
//require_once ("classes/model/HolidayPeer.php");
//require_once ("classes/model/TaskPeer.php");
//require_once ("classes/model/Task.php");
//G::LoadClass( "dates" );
/**
* Skeleton subclass for representing a row from the 'APP_DELEGATION' table.
*
@@ -273,7 +267,6 @@ class AppDelegation extends BaseAppDelegation
$dataAbe = $resultAbe->getRow();
$flagActionsByEmail = false;
if($dataAbe['ABE_TYPE']!='' && $data->USR_UID!=''){
G::LoadClass('actionsByEmailCore');
$actionsByEmail = new actionsByEmailCoreClass();
$actionsByEmail->sendActionsByEmail($data, $dataAbe);
}
@@ -285,7 +278,6 @@ class AppDelegation extends BaseAppDelegation
/*----------------------------------********---------------------------------*/
$licensedFeatures = &PMLicensedFeatures::getSingleton ();
if ($licensedFeatures->verifyfeature ( '7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09' )) {
G::LoadClass("pmGoogleApi");
try{
$pmGoogle = new PMGoogleApi ();
if ($pmGoogle->getServiceGmailStatus()) {

View File

@@ -180,11 +180,6 @@ class AppEvent extends BaseAppEvent
public function executeEvents ($sNow, $debug = false, &$log = array(), $cron = 0)
{
require_once 'classes/model/Configuration.php';
require_once 'classes/model/Triggers.php';
G::LoadClass( 'case' );
$debug = 1;
$oCase = new Cases();

View File

@@ -293,9 +293,7 @@ class AppFolder extends BaseAppFolder
//require_once ("classes/model/OutputDocument.php");
//require_once ("classes/model/Users.php");
G::LoadClass( 'case' );
$oCase = new Cases();
G::LoadClass( 'process' );
$oProcess = new Process();
$oAppDocument = new AppDocument();
@@ -447,9 +445,7 @@ class AppFolder extends BaseAppFolder
public function getDirectoryContentSortedBy ($folderID, $docIdFilter = array(), $keyword = null, $searchType = null, $limit = 0, $start = 0, $user = '', $onlyActive = false, $direction = 'ASC', $ColumnSort = 'appDocCreateDate', $search = null)
{
G::LoadClass( 'case' );
$oCase = new Cases();
G::LoadClass( 'process' );
$oProcess = new Process();
$oAppDocument = new AppDocument();
@@ -606,9 +602,7 @@ class AppFolder extends BaseAppFolder
//**** start get Doc Info
$oApp = new Application();
$oAppDocument = new AppDocument();
G::LoadClass( 'case' );
$oCase = new Cases();
G::LoadClass( 'process' );
$oProcess = new Process();
if (($oApp->exists( $appUid )) || ($appUid == "00000000000000000000000000000000")) {
if ($appUid == "00000000000000000000000000000000") {

View File

@@ -50,7 +50,6 @@ class AppHistory extends BaseAppHistory
public function getDynaformHistory($PRO_UID, $TAS_UID, $APP_UID, $DYN_UID = "")
{
G::LoadClass('case');
$oCase = new Cases();
$aObjectPermissions = $oCase->getAllObjects($PRO_UID, $APP_UID, $TAS_UID, $_SESSION['USER_LOGGED']);
@@ -222,7 +221,6 @@ class AppHistory extends BaseAppHistory
global $_DBArray;
$_DBArray['DynaformsHistory'] = $aDynHistory;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('DynaformsHistory');
$oCriteria->addAscendingOrderByColumn(AppHistoryPeer::HISTORY_DATE);

View File

@@ -130,7 +130,6 @@ class AppNotes extends BaseAppNotes
if ($notify) {
if ($noteRecipients == "") {
$noteRecipientsA = array ();
G::LoadClass( 'case' );
$oCase = new Cases();
$p = $oCase->getUsersParticipatedInCase( $appUid );
foreach ($p['array'] as $key => $userParticipated) {
@@ -148,9 +147,7 @@ class AppNotes extends BaseAppNotes
public function sendNoteNotification ($appUid, $usrUid, $noteContent, $noteRecipients, $sFrom = "")
{
try {
if (!class_exists('System')) {
G::LoadClass('system');
}
$aConfiguration = System::getEmailConfiguration();
$msgError = "";
@@ -163,7 +160,6 @@ class AppNotes extends BaseAppNotes
$aUser = $oUser->load( $usrUid );
$authorName = ((($aUser['USR_FIRSTNAME'] != '') || ($aUser['USR_LASTNAME'] != '')) ? $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' ' : '') . '<' . $aUser['USR_EMAIL'] . '>';
G::LoadClass( 'case' );
$oCase = new Cases();
$aFields = $oCase->loadCase( $appUid );
$configNoteNotification['subject'] = G::LoadTranslation( 'ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION' ) . " @#APP_TITLE ";
@@ -177,7 +173,6 @@ class AppNotes extends BaseAppNotes
$sSubject = G::replaceDataField( $configNoteNotification['subject'], $aFields );
$sBody = nl2br( G::replaceDataField( $configNoteNotification['body'], $aFields ) );
G::LoadClass( 'spool' );
$oUser = new Users();
$recipientsArray = explode( ",", $noteRecipients );
@@ -224,7 +219,6 @@ class AppNotes extends BaseAppNotes
$response = $this->postNewNote($applicationUid, $userUid, $note, false);
if ($sendMail == 1) {
G::LoadClass("case");
$case = new Cases();

View File

@@ -454,8 +454,6 @@ class CaseScheduler extends BaseCaseScheduler
$pluginParts = explode("--", $row["CASE_SH_PLUGIN_UID"]);
if (count($pluginParts) == 2) {
//Plugins
G::LoadClass("plugin");
//Here we are loading all plugins registered
//The singleton has a list of enabled plugins

View File

@@ -361,7 +361,6 @@ class Content extends BaseContent
FROM CONTENT
ORDER BY CON_ID, CON_CATEGORY, CON_PARENT, CON_LANG";
G::LoadClass( "wsTools" );
$workSpace = new workspaceTools( $workSpace );
$workSpace->getDBInfo();

View File

@@ -29,7 +29,6 @@ class DashboardIndicator extends BaseDashboardIndicator
}
function loadbyDasUid ($dasUid, $vcompareDate, $vmeasureDate, $userUid)
{
G::loadClass('indicatorsCalculator');
$calculator = new \IndicatorsCalculator();
try {

View File

@@ -550,7 +550,6 @@ class Department extends BaseDepartment
$row = $rs->getRow();
}
G::LoadClass( 'ArrayPeer' );
global $_DBArray;
$_DBArray['DepartmentUserList'] = $aUsers;
$_SESSION['_DBArray'] = $_DBArray;

View File

@@ -25,10 +25,6 @@
*
*/
//require_once 'classes/model/om/BaseDynaform.php';
//require_once 'classes/model/Content.php';
//require_once ('classes/model/AdditionalTables.php');
//G::LoadClass( 'dynaFormField' );
/**
* Skeleton subclass for representing a row from the 'DYNAFORM' table.

View File

@@ -425,7 +425,6 @@ class Event extends BaseEvent
try {
$rowsCreated = 0;
$rowsRejected = 0;
G::LoadClass( 'calendar' );
$oCalendar = new calendar();
//SELECT
@@ -551,7 +550,6 @@ class Event extends BaseEvent
try {
$rowsCreated = 0;
$rowsRejected = 0;
G::LoadClass( 'calendar' );
$oCalendar = new calendar();
// SELECT TASK2.* ,
// EVENT.EVN_UID, EVENT.PRO_UID, EVENT.EVN_TAS_UID_FROM,
@@ -686,7 +684,6 @@ class Event extends BaseEvent
foreach ($aRows as $aData) {
// if the events has a condition
if (trim( $aData['EVN_CONDITIONS'] ) != '') {
G::LoadClass( 'case' );
$oCase = new Cases();
$aFields = $oCase->loadCase( $APP_UID );
@@ -875,7 +872,6 @@ class Event extends BaseEvent
public function toCalculateTime ($aData, $iDate = null)
{
G::LoadClass( 'calendar' );
$oCalendar = new calendar();
$iDate = isset( $iDate ) ? $iDate : date( 'Y-m-d H:i:s' );

View File

@@ -373,11 +373,6 @@ class Groupwf extends BaseGroupwf
public function filterGroup ($filter, $start, $limit)
{
require_once 'classes/model/Groupwf.php';
require_once 'classes/model/TaskUser.php';
require_once 'classes/model/GroupUser.php';
G::LoadClass( 'configuration' );
$co = new Configurations();
$config = $co->getConfiguration( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$env = $co->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );

View File

@@ -305,9 +305,6 @@ class Language extends BaseLanguage
//export
public function export ()
{
G::LoadSystem( 'i18n_po' );
G::LoadClass( "system" );
//get labels MichelangeloFE
try {
$oTranslation = new Translation();
@@ -688,9 +685,6 @@ class Language extends BaseLanguage
throw new Exception( 'Translation.php not exist in plugin ' . $plugin);
}
G::LoadSystem( 'i18n_po' );
G::LoadClass( "system" );
$language = new Language();
$locale = $language;

View File

@@ -300,8 +300,6 @@ class ListUnassigned extends BaseListUnassigned
public function getSelfServiceCasesByEvaluate($userUid)
{
try {
G::LoadClass("groups");
$arrayAppAssignSelfServiceValueData = array();
//Get APP_UIDs
@@ -379,8 +377,6 @@ class ListUnassigned extends BaseListUnassigned
$row = $rs->getRow();
}
//check groups assigned to SelfService task
G::LoadClass('groups');
$group = new Groups();
$aGroups = $group->getActiveGroupsForAnUser($userUid);

View File

@@ -327,7 +327,6 @@ class Process extends BaseProcess
$uids[] = $processes[sizeof( $processes ) - 1]['PRO_UID'];
}
G::loadClass( 'configuration' );
$oConf = new Configurations();
$oConf->loadConfig( $obj, 'ENVIRONMENT_SETTINGS', '' );
@@ -667,7 +666,6 @@ class Process extends BaseProcess
$uids[] = $processes[sizeof( $processes ) - 1]['PRO_UID'];
}
G::loadClass( 'configuration' );
$oConf = new Configurations();
$oConf->loadConfig( $obj, 'ENVIRONMENT_SETTINGS', '' );

View File

@@ -489,7 +489,6 @@ class Task extends BaseTask
$this->setNew(false);
/*----------------------------------********---------------------------------*/
G::LoadClass("indicatorsCalculator");
$indicator = new indicatorsCalculator();
$data = $indicator->suggestedTimeForTask($TasUid);
$aFields["TAS_AVERAGE"] = $data['average'];
@@ -724,7 +723,6 @@ class Task extends BaseTask
public function setTasCalendar($taskUid, $calendarUid)
{
//Save Calendar ID for this process
G::LoadClass("calendar");
$calendarObj = new Calendar();
$calendarObj->assignCalendarTo($taskUid, $calendarUid, 'TASK');
}

View File

@@ -547,7 +547,6 @@ class Translation extends BaseTranslation
public function getInfoFromPOFile ($file)
{
G::loadClass( 'i18n_po' );
$POFile = new i18n_PO( $file );
$POFile->readInit();
$POHeaders = $POFile->getHeaders();

View File

@@ -285,13 +285,6 @@ class Users extends BaseUsers
}
try {
require_once ("classes/model/IsoCountry.php");
require_once ("classes/model/IsoLocation.php");
require_once ("classes/model/IsoSubdivision.php");
require_once ("classes/model/Language.php");
G::LoadClass( "calendar" );
$aFields = $this->load( $userUid );
$c = new Criteria( "workflow" );

View File

@@ -171,7 +171,6 @@ class UsersProperties extends BaseUsersProperties
}
}
if (PPP_EXPIRATION_IN > 0) {
G::LoadClass( 'calendar' );
$oCalendar = new calendar();
if ($oCalendar->pmCalendarUid == '') {
@@ -263,7 +262,6 @@ class UsersProperties extends BaseUsersProperties
$url = '/sys' . SYS_SYS . '/' . $this->lang . '/' . SYS_SKIN . '/main';
}
global $RBAC;
G::loadClass( 'configuration' );
$oConf = new Configurations();
$oConf->loadConfig( $x, 'USER_PREFERENCES', '', '', $_SESSION['USER_LOGGED'], '' );
if (sizeof( $oConf->aConfig ) > 0) {
@@ -388,7 +386,6 @@ class UsersProperties extends BaseUsersProperties
public function _getDefaultLocation ()
{
global $RBAC;
G::loadClass( 'configuration' );
$oConf = new Configurations();
$oConf->loadConfig( $x, 'USER_PREFERENCES', '', '', $_SESSION['USER_LOGGED'], '' );