remove DEPO_TITLE

This commit is contained in:
Ronald Q
2016-06-29 12:07:16 -04:00
parent 5c79eb30da
commit 6a82ca3e96
5 changed files with 25 additions and 26 deletions

View File

@@ -132,7 +132,7 @@ class PMDashlet extends DashletInstance implements DashletInterface
$departmentInstance = new Department();
try {
$department = $departmentInstance->load( $row['DAS_INS_OWNER_UID'] );
$row['DAS_INS_OWNER_TITLE'] = $department['DEPO_TITLE'];
$row['DAS_INS_OWNER_TITLE'] = $department['DEP_TITLE'];
} catch (Exception $error) {
$this->remove( $row['DAS_INS_UID'] );
$row['DAS_INS_UID'] = '';

View File

@@ -190,7 +190,6 @@ class Department extends BaseDepartment
if (is_object( $oDept ) && get_class( $oDept ) == 'Department') {
$aFields = $oDept->toArray( BasePeer::TYPE_FIELDNAME );
$this->fromArray( $aFields, BasePeer::TYPE_FIELDNAME );
//$aFields['DEPO_TITLE'] = $oDept->getDepTitle();
return $aFields;
} else {
throw (new Exception( "The row '$DepUid' in table Department doesn't exist!" ));
@@ -293,7 +292,7 @@ class Department extends BaseDepartment
Content::removeContent( 'DEPO_TITLE', '', $oPro->getDepUid() );
Content::removeContent( 'DEPO_DESCRIPTION', '', $oPro->getDepUid() );
G::auditLog("DeleteDepartament", "Departament Name: ".$dptoTitle['DEPO_TITLE']." Departament ID: (".$oPro->getDepUid().") ");
G::auditLog("DeleteDepartament", "Departament Name: ".$dptoTitle['DEP_TITLE']." Departament ID: (".$oPro->getDepUid().") ");
return $oPro->delete();
} else {
throw (new Exception( "The row '$ProUid' in table Group doesn't exist!" ));

View File

@@ -72,7 +72,7 @@ switch ($_POST['action']) {
case 'showUsers':
global $G_PUBLISH;
$oDept = new Department();
$aFields = $oDept->load( $_POST['sDptoUID'] );
$aFields = $oDept->Load( $_POST['sDptoUID'] );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'departments/departments_Edit', '', $aFields, '' );
@@ -82,7 +82,7 @@ switch ($_POST['action']) {
//$G_PUBLISH->AddContent('propeltable', 'paged-table', 'departments/departments_UsersList', $criteria, $aFields);
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( "groupname='{$aFields["DEPO_TITLE"]}';" );
$oHeadPublisher->addScriptCode( "groupname='{$aFields["DEP_TITLE"]}';" );
$oHeadPublisher->addScriptCode( "depUid='{$aFields["DEP_UID"]}';" );
G::RenderPage( 'publish', 'raw' );

View File

@@ -55,8 +55,8 @@ try {
$userFields = $oUser->toArray( BasePeer::TYPE_FIELDNAME );
$aFields['USR_REPORTS_TO'] = $userFields['USR_FIRSTNAME'] . ' ' . $userFields['USR_LASTNAME'];
try {
$depFields = $oDepInfo->load( $userFields['DEP_UID'] . 'xy<' );
$aFields['USR_REPORTS_TO'] .= " (" . $depFields['DEPO_TITLE'] . ")";
$depFields = $oDepInfo->Load( $userFields['DEP_UID'] . 'xy<' );
$aFields['USR_REPORTS_TO'] .= " (" . $depFields['DEP_TITLE'] . ")";
} catch (Exception $e) {
}
} else {
@@ -64,8 +64,8 @@ try {
}
try {
$depFields = $oDepInfo->load( $aFields['DEP_UID'] );
$aFields['USR_DEPARTMENT'] = $depFields['DEPO_TITLE'];
$depFields = $oDepInfo->Load( $aFields['DEP_UID'] );
$aFields['USR_DEPARTMENT'] = $depFields['DEP_TITLE'];
} catch (Exception $e) {
$oUser = UsersPeer::retrieveByPk( $_SESSION['USER_LOGGED'] );
$oUser->setDepUid( '' );

View File

@@ -25,8 +25,8 @@ 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
// 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' );
}
@@ -54,7 +54,7 @@ try {
$G_PUBLISH = new Publisher();
//getting the user and department
//getting the user and department
$oDepInfo = new Department();
$oUser = UsersPeer::retrieveByPk( $aFields['USR_REPORTS_TO'] );
if ($oUser != '')
@@ -62,8 +62,8 @@ try {
$userFields = $oUser->toArray( BasePeer::TYPE_FIELDNAME );
$aFields['USR_REPORTS_TO'] = $userFields['USR_FIRSTNAME'] . ' ' . $userFields['USR_LASTNAME'];
try {
$depFields = $oDepInfo->load( $userFields['DEP_UID'] );
$aFields['USR_REPORTS_TO'] .= " (" . $depFields['DEPO_TITLE'] . ")";
$depFields = $oDepInfo->Load( $userFields['DEP_UID'] );
$aFields['USR_REPORTS_TO'] .= " (" . $depFields['DEP_TITLE'] . ")";
} catch (Exception $e) {
}
} else {
@@ -71,15 +71,15 @@ try {
}
try {
$depFields = $oDepInfo->load( $aFields['DEP_UID'] );
$aFields['USR_DEPARTMENT'] = $depFields['DEPO_TITLE'];
$depFields = $oDepInfo->Load( $aFields['DEP_UID'] );
$aFields['USR_DEPARTMENT'] = $depFields['DEP_TITLE'];
} catch (Exception $e) {
$oUser = UsersPeer::retrieveByPk( $_GET['USR_UID'] );
$oUser->setDepUid( '' );
$oUser->save();
}
//Load Calendar options and falue for this user
//Load Calendar options and falue for this user
G::LoadClass( 'calendar' );
$calendar = new Calendar();
$calendarObj = $calendar->getCalendarList( true, true );
@@ -87,12 +87,12 @@ try {
$_DBArray['availableCalendars'] = $calendarObj['array'];
$_SESSION['_DBArray'] = $_DBArray;
$calendarInfo = $calendar->getCalendarFor( $_GET['USR_UID'], $_GET['USR_UID'], $_GET['USR_UID'] );
//If the function returns a DEFAULT calendar it means that this object doesn't have assigned any calendar
//If the function returns a DEFAULT calendar it means that this object doesn't have assigned any calendar
$aFields['USR_CALENDAR'] = $calendarInfo['CALENDAR_APPLIED'] != 'DEFAULT' ? $calendarInfo['CALENDAR_UID'] : "";
$aFields['RANDOM'] = rand();
/////////////////////////
//SELECT USR_UID, CONCAT(USR_LASTNAME, " ", USR_FIRSTNAME) FROM USERS WHERE USR_STATUS = 1 AND USR_UID!= "@#USR_UID" ORDER BY USR_LASTNAME
/////////////////////////
//SELECT USR_UID, CONCAT(USR_LASTNAME, " ", USR_FIRSTNAME) FROM USERS WHERE USR_STATUS = 1 AND USR_UID!= "@#USR_UID" ORDER BY USR_LASTNAME
require_once 'classes/model/Users.php';
$oCriteria = new Criteria();
$oCriteria->addSelectColumn( UsersPeer::USR_UID );
@@ -104,7 +104,7 @@ try {
$oCriteria->add( UsersPeer::USR_UID, $_GET['USR_UID'], Criteria::NOT_EQUAL );
$oDataset = UsersPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
///////////////////////
///////////////////////
G::loadClass( 'configuration' );
$oConf = new Configurations();
$oConf->loadConfig( $obj, 'ENVIRONMENT_SETTINGS', '' );
@@ -122,7 +122,7 @@ try {
);
}
//calculating the max upload file size;
//calculating the max upload file size;
$POST_MAX_SIZE = ini_get( 'post_max_size' );
$mul = substr( $POST_MAX_SIZE, - 1 );
$mul = ($mul == 'M' ? 1048576 : ($mul == 'K' ? 1024 : ($mul == 'G' ? 1073741824 : 1)));
@@ -141,15 +141,15 @@ try {
$_DBArray['aUserInfo'] = $aUserInfo;
$_SESSION['_DBArray'] = $_DBArray;
if ($_GET['USR_AUTH_SOURCE'] == 'ProcessMaker (MYSQL)') {
//always show this form users_EditRT.xml.
//always show this form users_EditRT.xml.
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'users/users_EditRT.xml', '', $aFields, 'users_Save?USR_UID=' . $_SESSION['CURRENT_USER'] );
} else {
//for users ldap always show this form users_EditLDAP.xml.
//for users ldap always show this form users_EditLDAP.xml.
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'users/users_EditLDAP.xml', '', $aFields, 'users_Save?USR_UID=' . $_SESSION['CURRENT_USER'] );
}
G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) {
die( $oException->getMessage() );
}
}