Remove pending G::LoadClass and G::LoadClassRBAC
This commit is contained in:
davidcallizaya
2017-08-04 08:54:13 -04:00
parent 3be5e942d3
commit 9d42e978a3
25 changed files with 1 additions and 51 deletions

View File

@@ -13,9 +13,6 @@
require_once ( "creole/Creole.php" ); require_once ( "creole/Creole.php" );
require_once ( PATH_CORE . "config/databases.php"); require_once ( PATH_CORE . "config/databases.php");
G::LoadClass ( '{$classFile}');
$obj = new {$className} ($dbc); $obj = new {$className} ($dbc);
$t = new lime_test( {$testItems}, new lime_output_color() ); $t = new lime_test( {$testItems}, new lime_output_color() );

View File

@@ -488,8 +488,7 @@ class Propel {
* @date: 27-05-08 11:48 * * @date: 27-05-08 11:48 *
* @Description: this was added for the additional database connections * * @Description: this was added for the additional database connections *
***********************************************************************/ ***********************************************************************/
G::LoadClass ('dbConnections'); $oDbConnections = new dbConnections($_SESSION['PROCESS']);
$oDbConnections = new dbConnections($_SESSION['PROCESS']);
$oDbConnections->loadAdditionalConnections(); $oDbConnections->loadAdditionalConnections();
$dsn = isset(self::$configuration['datasources'][$name]['connection']) ? self::$configuration['datasources'][$name]['connection'] : null; $dsn = isset(self::$configuration['datasources'][$name]['connection']) ? self::$configuration['datasources'][$name]['connection'] : null;
} else { } else {

View File

@@ -2,7 +2,6 @@
function cliListIds($command, $args) function cliListIds($command, $args)
{ {
G::LoadClass("wsTools");
CLI::logging("list-ids INIT\n"); CLI::logging("list-ids INIT\n");
$workspaces = get_workspaces_from_args($command); $workspaces = get_workspaces_from_args($command);

View File

@@ -5330,9 +5330,6 @@ class Cases
} else { } else {
$sBody = nl2br($aTaskInfo['TAS_DEF_MESSAGE']); $sBody = nl2br($aTaskInfo['TAS_DEF_MESSAGE']);
} }
if (!class_exists('System')) {
G::LoadClass('system');
}
$aConfiguration = (!is_null(\EmailServerPeer::retrieveByPK($aTaskInfo['TAS_EMAIL_SERVER_UID']))) ? $aConfiguration = (!is_null(\EmailServerPeer::retrieveByPK($aTaskInfo['TAS_EMAIL_SERVER_UID']))) ?
$eServer->getEmailServer($aTaskInfo['TAS_EMAIL_SERVER_UID'], true) : $eServer->getEmailServer($aTaskInfo['TAS_EMAIL_SERVER_UID'], true) :
$eServer->getEmailServerDefault(); $eServer->getEmailServerDefault();
@@ -5414,9 +5411,6 @@ class Cases
} else { } else {
$sBody = nl2br($aTaskInfo['TAS_RECEIVE_MESSAGE']); $sBody = nl2br($aTaskInfo['TAS_RECEIVE_MESSAGE']);
} }
if (!class_exists('System')) {
G::LoadClass('system');
}
$aConfiguration = (!is_null(\EmailServerPeer::retrieveByPK($aTaskInfo['TAS_RECEIVE_SERVER_UID']))) ? $aConfiguration = (!is_null(\EmailServerPeer::retrieveByPK($aTaskInfo['TAS_RECEIVE_SERVER_UID']))) ?
$eServer->getEmailServer($aTaskInfo['TAS_RECEIVE_SERVER_UID'], true) : $eServer->getEmailServer($aTaskInfo['TAS_RECEIVE_SERVER_UID'], true) :
$eServer->getEmailServerDefault(); $eServer->getEmailServerDefault();

View File

@@ -748,7 +748,6 @@ function handleFatalErrors ($buffer)
} }
if (preg_match( '/(error<\/b>:)(.+)(<br)/', $buffer, $regs )) { if (preg_match( '/(error<\/b>:)(.+)(<br)/', $buffer, $regs )) {
G::LoadClass( 'case' );
$oCase = new Cases(); $oCase = new Cases();
$err = preg_replace( '/<.*?>/', '', $regs[2] ); $err = preg_replace( '/<.*?>/', '', $regs[2] );
$aAux = explode( ' in ', $err ); $aAux = explode( ' in ', $err );

View File

@@ -208,7 +208,6 @@ class ObjectPermission extends BaseObjectPermission
*/ */
public function verifyObjectPermissionPerGroup ($usrUid, $proUid, $tasUid = '', $action = '') public function verifyObjectPermissionPerGroup ($usrUid, $proUid, $tasUid = '', $action = '')
{ {
G::loadClass('groups');
$gr = new Groups(); $gr = new Groups();
$records = $gr->getActiveGroupsForAnUser($usrUid); $records = $gr->getActiveGroupsForAnUser($usrUid);
$groupPermissions = array(); $groupPermissions = array();

View File

@@ -592,7 +592,6 @@ class Home extends Controller
function getUserArray($action, $userUid, $search = null) function getUserArray($action, $userUid, $search = null)
{ {
G::LoadClass("configuration");
$conf = new Configurations(); $conf = new Configurations();
$confEnvSetting = $conf->getFormats(); $confEnvSetting = $conf->getFormats();
$users = array(); $users = array();

View File

@@ -47,7 +47,6 @@ if ($actionAjax == "userValues") {
$action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : null; $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : null;
$query = isset( $_REQUEST['query'] ) ? $_REQUEST['query'] : null; $query = isset( $_REQUEST['query'] ) ? $_REQUEST['query'] : null;
G::LoadClass("configuration");
$conf = new Configurations(); $conf = new Configurations();
$confEnvSetting = $conf->getFormats(); $confEnvSetting = $conf->getFormats();
$users = array(); $users = array();

View File

@@ -65,10 +65,6 @@ switch ($RBAC->userCanAccess( 'PM_CASES' )) {
} }
/* Includes */ /* Includes */
G::LoadClass( 'pmScript' );
G::LoadClass( 'case' );
G::LoadClass( 'derivation' );
//If no variables are submitted and the $_POST variable is empty //If no variables are submitted and the $_POST variable is empty
if (!isset($_POST['form'])) { if (!isset($_POST['form'])) {
$_POST['form'] = array(); $_POST['form'] = array();

View File

@@ -5,7 +5,6 @@ switch ($request) {
case 'getRows': case 'getRows':
$fieldname = $_POST['fieldname']; $fieldname = $_POST['fieldname'];
G::LoadClass('case');
$oApp = new Cases(); $oApp = new Cases();
$aFields = $oApp->loadCase($_SESSION['APPLICATION']); $aFields = $oApp->loadCase($_SESSION['APPLICATION']);
$aVars = Array(); $aVars = Array();

View File

@@ -40,7 +40,6 @@ if (!isset($_GET['APP_UID']) && !isset($_GET['APP_NUMBER']) && !isset($_GET['DEL
} }
//Get the APP_UID related to APP_NUMBER //Get the APP_UID related to APP_NUMBER
if (!isset($_GET['APP_UID']) && isset($_GET['APP_NUMBER'])) { if (!isset($_GET['APP_UID']) && isset($_GET['APP_NUMBER'])) {
G::LoadClass('case');
$oCase = new Cases(); $oCase = new Cases();
$appUid = $oCase->getApplicationUIDByNumber(htmlspecialchars($_GET['APP_NUMBER'])); $appUid = $oCase->getApplicationUIDByNumber(htmlspecialchars($_GET['APP_NUMBER']));
if (is_null( $appUid )) { if (is_null( $appUid )) {
@@ -51,7 +50,6 @@ if (!isset($_GET['APP_UID']) && isset($_GET['APP_NUMBER'])) {
} }
//If we don't have the DEL_INDEX we get the current delIndex. Data reporting tool does not have this information //If we don't have the DEL_INDEX we get the current delIndex. Data reporting tool does not have this information
if (!isset($_GET['DEL_INDEX'])) { if (!isset($_GET['DEL_INDEX'])) {
G::LoadClass('case');
$oCase = new Cases(); $oCase = new Cases();
$delIndex = $oCase->getCurrentDelegation($appUid, $_SESSION['USER_LOGGED']); $delIndex = $oCase->getCurrentDelegation($appUid, $_SESSION['USER_LOGGED']);
if (is_null( $delIndex )) { if (is_null( $delIndex )) {

View File

@@ -67,7 +67,6 @@ try {
break; break;
} }
G::LoadClass("applications");
$apps = new Applications(); $apps = new Applications();
if ($action == 'search') { if ($action == 'search') {

View File

@@ -62,9 +62,6 @@ session_regenerate_id();
$_SESSION = array_merge($_SESSION, $arraySession); $_SESSION = array_merge($_SESSION, $arraySession);
//Required classes for dbArray work //Required classes for dbArray work
//require_once ("propel/Propel.php");
//require_once ("creole/Creole.php");
//G::LoadThirdParty ("pake", "pakeColor.class");
Propel::init (PATH_CORE . "config/databases.php"); Propel::init (PATH_CORE . "config/databases.php");
Creole::registerDriver ('dbarray', 'creole.contrib.DBArrayConnection'); Creole::registerDriver ('dbarray', 'creole.contrib.DBArrayConnection');

View File

@@ -5,7 +5,6 @@ global $RBAC;
if ($RBAC->userCanAccess('PM_FACTORY') == 1) { if ($RBAC->userCanAccess('PM_FACTORY') == 1) {
if (isset($_SESSION['processes_upload'])) { if (isset($_SESSION['processes_upload'])) {
$form = $_SESSION['processes_upload']; $form = $_SESSION['processes_upload'];
G::LoadClass('processes');
$app = new Processes(); $app = new Processes();
if (!$app->processExists($form['PRO_UID'])) { if (!$app->processExists($form['PRO_UID'])) {
$result = 0; $result = 0;

View File

@@ -52,8 +52,6 @@ if (PMLicensedFeatures
$aber = G::decrypt($_REQUEST['ABER'], URL_KEY); $aber = G::decrypt($_REQUEST['ABER'], URL_KEY);
$forms = isset($_REQUEST['form']) ? $_REQUEST['form'] : []; $forms = isset($_REQUEST['form']) ? $_REQUEST['form'] : [];
G::LoadClass('case');
$case = new Cases(); $case = new Cases();
$casesFields = $case->loadCase($appUid, $delIndex); $casesFields = $case->loadCase($appUid, $delIndex);

View File

@@ -32,8 +32,6 @@
if (isset( $_FILES ) && $_FILES["ATTACH_FILE"]["error"] == 0) { if (isset( $_FILES ) && $_FILES["ATTACH_FILE"]["error"] == 0) {
try { try {
G::LoadClass( "case" );
$application = new Application(); $application = new Application();
if (!$application->exists($_POST["APPLICATION"])) { if (!$application->exists($_POST["APPLICATION"])) {
throw new Exception(G::LoadTranslation("ID_CASE_NOT_EXISTS") . ": {$_POST['APPLICATION']}"); throw new Exception(G::LoadTranslation("ID_CASE_NOT_EXISTS") . ": {$_POST['APPLICATION']}");

View File

@@ -24,6 +24,5 @@
*/ */
$RBAC->requirePermissions('PM_SETUP_ADVANCE'); $RBAC->requirePermissions('PM_SETUP_ADVANCE');
G::LoadClass('plugin');
$items = \PMPlugin::getListPluginsManager(SYS_SYS); $items = \PMPlugin::getListPluginsManager(SYS_SYS);
echo G::json_encode($items); echo G::json_encode($items);

View File

@@ -528,7 +528,6 @@ class Cases
throw (new \Exception($arrayData)); throw (new \Exception($arrayData));
} }
} else { } else {
\G::LoadClass("wsBase");
$ws = new \wsBase(); $ws = new \wsBase();
$fields = $ws->getCaseInfo($applicationUid, 0); $fields = $ws->getCaseInfo($applicationUid, 0);
$array = json_decode(json_encode($fields), true); $array = json_decode(json_encode($fields), true);

View File

@@ -846,8 +846,6 @@ class Light
public function getInfoResume($userUid, $Fields, $type) public function getInfoResume($userUid, $Fields, $type)
{ {
/* Prepare page before to show */ /* Prepare page before to show */
G::LoadClass( 'case' );
$objProc = new \Process(); $objProc = new \Process();
$aProc = $objProc->load( $Fields['PRO_UID'] ); $aProc = $objProc->load( $Fields['PRO_UID'] );
$Fields['PRO_TITLE'] = $aProc['PRO_TITLE']; $Fields['PRO_TITLE'] = $aProc['PRO_TITLE'];

View File

@@ -808,7 +808,6 @@ class Variable
//This value is required to be able to query the database. //This value is required to be able to query the database.
$_SESSION["PROCESS"] = $proUid; $_SESSION["PROCESS"] = $proUid;
//The pmdynaform class is instantiated //The pmdynaform class is instantiated
\G::LoadClass("pmDynaform");
$pmDynaform = new \pmDynaform(array("APP_DATA" => $params)); $pmDynaform = new \pmDynaform(array("APP_DATA" => $params));
//Get control from dynaform. //Get control from dynaform.

View File

@@ -1009,7 +1009,6 @@ class Light extends Api
$caseVariables = DateTime::convertUtcToTimeZone($caseVariables); $caseVariables = DateTime::convertUtcToTimeZone($caseVariables);
} }
\G::LoadClass("pmDynaform");
$pmDynaform = new \pmDynaform(array("APP_DATA" => $caseVariables, "CURRENT_DYNAFORM" => $dyn_uid)); $pmDynaform = new \pmDynaform(array("APP_DATA" => $caseVariables, "CURRENT_DYNAFORM" => $dyn_uid));
$pmDynaform->jsonr($result['formContent']); $pmDynaform->jsonr($result['formContent']);
return $result; return $result;

View File

@@ -25,11 +25,6 @@
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' ); //G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
// What does this do and how can we do this dynamically?
// -chloe deguzman
// G::LoadClass('{$pack->classFile}');
$dbc = new DBConnection(); $dbc = new DBConnection();
$ses = new DBSession($dbc); $ses = new DBSession($dbc);

View File

@@ -25,9 +25,6 @@
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' ); //G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
// How do we fix this?
// G::LoadClass('{$pack->classFile}');
$dbc = new DBConnection(); $dbc = new DBConnection();
$ses = new DBSession($dbc); $ses = new DBSession($dbc);

View File

@@ -24,9 +24,6 @@
*/ */
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' ); //G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
// How do we fix this? -- Chloe Deguzman
// G::LoadClass('{$pack->classFile}');
$dbc = new DBConnection(); $dbc = new DBConnection();
$ses = new DBSession($dbc); $ses = new DBSession($dbc);

View File

@@ -65,8 +65,6 @@ try {
{USR_VAR} {USR_VAR}
if ($USR_UID == -1) { if ($USR_UID == -1) {
G::LoadClass("sessions");
global $sessionId; global $sessionId;
$sessions = new Sessions(); $sessions = new Sessions();