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

@@ -22,19 +22,15 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
require_once (PATH_RBAC . "model/RolesPeer.php");
G::LoadClass( 'ArrayPeer' );
isset( $_POST['textFilter'] ) ? $filter = $_POST['textFilter'] : $filter = '';
$sDelimiter = DBAdapter::getStringDelimiter();
require_once 'classes/model/Users.php';
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( UsersPeer::USR_UID );
$sDataBase = 'database_' . strtolower( DB_ADAPTER );
if (G::LoadSystemExist( $sDataBase )) {
G::LoadSystem( $sDataBase );
$oDataBase = new database();
$oCriteria->addAsColumn( 'USR_COMPLETENAME', $oDataBase->concatString( "USR_LASTNAME", "' '", "USR_FIRSTNAME" ) );
//$oCriteria->addAsColumn('USR_PHOTO', $oDataBase->concatString("'".PATH_IMAGES_ENVIRONMENT_USERS."'", "USR_UID","'.gif'"));

View File

@@ -23,7 +23,7 @@
*/
if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1)
return $RBAC_Response;
G::LoadClass( "xmlMenu" );
$form = new Form( 'myInfo/myInfoAEdit.xml', PATH_XMLFORM );
$form->action = urlencode( G::encrypt( '', URL_KEY ) );
$form->ajaxServer = urlencode( G::encrypt( SYS_URI . '/gulliver/defaultAjax', URL_KEY ) );

View File

@@ -27,11 +27,6 @@ try {
// deprecated the class XmlForm_Field_Image is currently part of the class.xmlform.php package
// the use of the external xmlfield_Image is highly discouraged
if (! class_exists( 'XmlForm_Field_Image' )) {
G::LoadClass( 'xmlfield_Image' );
}
require_once 'classes/model/Users.php';
require_once 'classes/model/Department.php';
unset( $_SESSION['CURRENT_USER'] );
$oUser = new Users();
@@ -81,7 +76,7 @@ try {
#verifying if it has any preferences on the configurations table
G::loadClass( 'configuration' );
$oConf = new Configurations();
$oConf->loadConfig( $x, 'USER_PREFERENCES', '', '', $_SESSION['USER_LOGGED'], '' );
@@ -148,7 +143,6 @@ try {
$_DBArray['CASES_MENU'] = $rowsCasesMenu;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass( 'ArrayPeer' );
$oCriteria = new Criteria( 'dbarray' );
$oCriteria->setDBArrayTable( 'menutab' );

View File

@@ -148,8 +148,6 @@ try {
$def_menu = $_POST['form']['PREF_DEFAULT_MENUSELECTED'];
$def_cases_menu = $_POST['form']['PREF_DEFAULT_CASES_MENUSELECTED'];
G::loadClass( 'configuration' );
$oConf = new Configurations();
$aConf = Array ('DEFAULT_LANG' => $def_lang,'DEFAULT_MENU' => $def_menu,'DEFAULT_CASES_MENU' => $def_cases_menu
);

View File

@@ -87,7 +87,6 @@ switch ($_POST['action']) {
echo G::json_encode($arrayUser);
break;
case 'availableCalendars':
G::LoadClass('calendar');
$calendar = new Calendar();
$calendarObj = $calendar->getCalendarList(true, true);
$oData[] = array('CALENDAR_UID' => '', 'CALENDAR_NAME' => '- ' . G::LoadTranslation('ID_NONE') . ' -');
@@ -176,7 +175,6 @@ switch ($_POST['action']) {
$user->auditLog($auditLogType, array_merge(['USR_UID' => $userUid, 'USR_USERNAME' => $arrayUserData['USR_USERNAME']], $form));
/* Saving preferences */
G::loadClass('configuration');
$def_lang = isset($form['PREF_DEFAULT_LANG']) ? $form['PREF_DEFAULT_LANG'] : '';
$def_menu = isset($form['PREF_DEFAULT_MENUSELECTED']) ? $form['PREF_DEFAULT_MENUSELECTED'] : '';
$def_cases_menu = isset($form['PREF_DEFAULT_CASES_MENUSELECTED']) ? $form['PREF_DEFAULT_CASES_MENUSELECTED'] : '';
@@ -221,7 +219,6 @@ switch ($_POST['action']) {
$aFields = $oUser->loadDetailed($_POST['USR_UID']);
//Load Calendar options and falue for this user
G::LoadClass('calendar');
$calendar = new Calendar();
$calendarInfo = $calendar->getCalendarFor($_POST['USR_UID'], $_POST['USR_UID'], $_POST['USR_UID']);
//If the function returns a DEFAULT calendar it means that this object doesn't have assigned any calendar
@@ -229,7 +226,6 @@ switch ($_POST['action']) {
$aFields['CALENDAR_NAME'] = $calendarInfo['CALENDAR_NAME'];
#verifying if it has any preferences on the configurations table
G::loadClass('configuration');
$oConf = new Configurations();
$oConf->loadConfig($x, 'USER_PREFERENCES', '', '', $aFields['USR_UID'], '');

View File

@@ -54,12 +54,10 @@ $G_ID_SUB_MENU_SELECTED = 'USERS';
$G_PUBLISH = new Publisher();
G::LoadClass( 'configuration' );
$c = new Configurations();
$configEnv = $c->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
$Config['fullNameFormat'] = isset( $configEnv['format'] ) ? $configEnv['format'] : '@firstName @lastName (@userName)';
require_once 'classes/model/Users.php';
$oCriteria = new Criteria();
$oCriteria->addSelectColumn( UsersPeer::USR_FIRSTNAME );
$oCriteria->addSelectColumn( UsersPeer::USR_LASTNAME );

View File

@@ -208,7 +208,6 @@ try {
//Assign user in a group
$USR_UID = $_POST['USR_UID'];
$gUIDs = explode(',', $_POST['GRP_UID']);
G::LoadClass('groups');
$oGroup = new Groups();
foreach ($gUIDs as $GRP_UID) {
$oGroup->addUserToGroup($GRP_UID, $USR_UID);
@@ -218,7 +217,6 @@ try {
//Remove a user from a group
$USR_UID = $_POST['USR_UID'];
$gUIDs = explode(',', $_POST['GRP_UID']);
G::LoadClass('groups');
$oGroup = new Groups();
foreach ($gUIDs as $GRP_UID) {
$oGroup->removeUserOfGroup($GRP_UID, $USR_UID);
@@ -322,7 +320,6 @@ try {
echo '{users: ' . G::json_encode($rows['data']) . ', total_users: ' . $oDatasetUsers["totalRows"] . '}';
break;
case 'updatePageSize':
G::LoadClass('configuration');
$c = new Configurations();
$arr['pageSize'] = $_REQUEST['size'];
$arr['dateSave'] = date('Y-m-d H:i:s');

View File

@@ -46,10 +46,8 @@ try {
$oUser->remove($_GET['USR_UID']);*/
//print_r($_GET['USR_UID']); die
G::LoadClass( 'tasks' );
$oTasks = new Tasks();
$oTasks->ofToAssignUserOfAllTasks( $_GET['USR_UID'] );
G::LoadClass( 'groups' );
$oGroups = new Groups();
$oGroups->removeUserOfAllGroups( $_GET['USR_UID'] );
$RBAC->changeUserStatus( $_GET['USR_UID'], 'CLOSED' );

View File

@@ -24,7 +24,6 @@
$USR_UID = $_GET['USR_UID'];
G::LoadClass( 'case' );
$oProcessMap = new Cases();
$c = $oProcessMap->getCriteriaUsersCases( 'TO_DO', $USR_UID );

View File

@@ -37,7 +37,7 @@ try {
die();
break;
}
G::LoadClass( 'case' );
$oCase = new Cases();
$aCases = array ();
$aUsers = array ();
@@ -54,7 +54,7 @@ try {
}
}
}
G::LoadClass( 'case' );
$oCase = new Cases();
require_once 'classes/model/Users.php';
$oUser = new Users();

View File

@@ -25,14 +25,6 @@ try {
global $RBAC;
$RBAC->requirePermissions( 'PM_USERS' );
// deprecated the class XmlForm_Field_Image is currently part of the class.xmlform.php package
// the use of the external xmlfield_Image is highly discouraged
if (! class_exists( 'XmlForm_Field_Image' )) {
G::LoadClass( 'xmlfield_Image' );
}
require_once 'classes/model/Users.php';
require_once 'classes/model/Department.php';
$_SESSION['CURRENT_USER'] = $_GET['USR_UID'];
$oUser = new Users();
$aFields = $oUser->load( $_GET['USR_UID'] );
@@ -80,7 +72,7 @@ try {
}
//Load Calendar options and falue for this user
G::LoadClass( 'calendar' );
$calendar = new Calendar();
$calendarObj = $calendar->getCalendarList( true, true );
global $_DBArray;
@@ -105,7 +97,7 @@ try {
$oDataset = UsersPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
///////////////////////
G::loadClass( 'configuration' );
$oConf = new Configurations();
$oConf->loadConfig( $obj, 'ENVIRONMENT_SETTINGS', '' );

View File

@@ -54,7 +54,6 @@ $G_ID_SUB_MENU_SELECTED = 'USERS';
$G_PUBLISH = new Publisher();
G::LoadClass('configuration');
$c = new Configurations();
$configPage = $c->getConfiguration('usersList', 'pageSize', '', $_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;

View File

@@ -53,8 +53,6 @@ try {
$uploadMaxSize = $postMaxSize;
$aFields['MAX_FILES_SIZE'] = " (" . $UPLOAD_MAX_SIZE . ") ";
//Load Calendar options and falue for this user
G::LoadClass( 'calendar' );
$calendar = new Calendar();
$calendarObj = $calendar->getCalendarList( true, true );
global $_DBArray;
@@ -84,7 +82,7 @@ try {
$oDataset = UsersPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
///////////////////////
G::loadClass( 'configuration' );
$oConf = new Configurations();
$oConf->loadConfig( $obj, 'ENVIRONMENT_SETTINGS', '' );

View File

@@ -22,7 +22,6 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
try {
G::LoadClass( 'case' );
$oCase = new Cases();
foreach ($_POST['USER'] as $sProcessUID => $sUserUID) {
if ($sUserUID != '') {

View File

@@ -96,7 +96,7 @@ try {
global $_DBArray;
$_DBArray['processesToReassign'] = $aProcesses;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass( 'ArrayPeer' );
$oCriteria = new Criteria( 'dbarray' );
$oCriteria->setDBArrayTable( 'processesToReassign' );
$G_PUBLISH->AddContent( 'propeltable', 'cases/paged-table-reassign', 'users/users_ReassignCases', $oCriteria, $_POST );

View File

@@ -85,13 +85,13 @@ try {
$aData['USR_UPDATE_DATE'] = date( 'Y-m-d H:i:s' );
$aData['USR_BIRTHDAY'] = date( 'Y-m-d' );
$aData['USR_AUTH_USER_DN'] = $form['USR_AUTH_USER_DN'];
//fixing bug in inactive user when the admin create a new user.
//fixing bug in inactive user when the admin create a new user.
$statusWF = $form['USR_STATUS'];
$aData['USR_STATUS'] = $form['USR_STATUS'] == 'ACTIVE' ? 1 : 0;
$sUserUID = $RBAC->createUser( $aData, $form['USR_ROLE'] );
$aData['USR_STATUS'] = $statusWF;
$aData['USR_UID'] = $sUserUID;
$aData['USR_PASSWORD'] = G::encryptOld( $sUserUID ); //fake :p
$aData['USR_PASSWORD'] = G::encryptOld( $sUserUID ); //fake :p
$aData['USR_COUNTRY'] = $form['USR_COUNTRY'];
$aData['USR_CITY'] = $form['USR_CITY'];
$aData['USR_LOCATION'] = $form['USR_LOCATION'];
@@ -99,8 +99,8 @@ try {
$aData['USR_PHONE'] = $form['USR_PHONE'];
$aData['USR_ZIP_CODE'] = $form['USR_ZIP_CODE'];
$aData['USR_POSITION'] = $form['USR_POSITION'];
// Commented by removal of resume in the addition and modification of user.
// $aData['USR_RESUME'] = $form['USR_RESUME'];
// Commented by removal of resume in the addition and modification of user.
// $aData['USR_RESUME'] = $form['USR_RESUME'];
$aData['USR_ROLE'] = $form['USR_ROLE'];
$aData['USR_REPLACED_BY'] = $form['USR_REPLACED_BY'];
@@ -173,7 +173,7 @@ try {
define( 'PPP_PASSWORD_HISTORY', 0 );
}
if (PPP_PASSWORD_HISTORY > 0) {
//it's looking a password igual into aHistory array that was send for post in md5 way
//it's looking a password igual into aHistory array that was send for post in md5 way
$c = 0;
$sw = 1;
while (count( $aHistory ) >= 1 && count( $aHistory ) > $c && $sw) {
@@ -190,7 +190,7 @@ try {
G::header( 'Location: ' . $_SERVER['HTTP_REFERER'] );
die();
}
//
//
if (count( $aHistory ) >= PPP_PASSWORD_HISTORY) {
$sLastPassw = array_shift( $aHistory );
}
@@ -273,10 +273,10 @@ try {
$_SESSION['USR_FULLNAME'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
}
//Save Calendar assigment
//Save Calendar assigment
if ((isset( $form['USR_CALENDAR'] ))) {
//Save Calendar ID for this user
G::LoadClass( "calendar" );
//Save Calendar ID for this user
$calendarObj = new Calendar();
$calendarObj->assignCalendarTo( $aData['USR_UID'], $form['USR_CALENDAR'], 'USER' );
}
@@ -293,5 +293,5 @@ try {
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publish', 'blank' );
}
}

View File

@@ -35,12 +35,7 @@ try {
die();
break;
}
// deprecated the class XmlForm_Field_Image is currently part of the class.xmlform.php package
// the use of the external xmlfield_Image is highly discouraged
if (! class_exists( 'XmlForm_Field_Image' )) {
G::LoadClass( 'xmlfield_Image' );
}
require_once 'classes/model/Users.php';
$_SESSION['CURRENT_USER'] = $_GET['USR_UID'];
$oUser = new Users();
$aFields = $oUser->load( $_GET['USR_UID'] );

View File

@@ -23,7 +23,7 @@
*/
if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1)
return $RBAC_Response;
G::LoadClass( "user" );
$uid = (isset( $_SESSION['CURRENT_USER'] ) ? $_SESSION['CURRENT_USER'] : $_SESSION['USER_LOGGED']);
require_once 'classes/model/Users.php';