Ajustes code style

This commit is contained in:
Freddy Daniel Rojas Valda
2013-12-04 12:44:39 -04:00
parent ad390b94fa
commit 0bd480a83c

View File

@@ -544,7 +544,6 @@ class Task
} }
/** /**
* Return a assignee list of an activity * Return a assignee list of an activity
* *
@@ -625,7 +624,7 @@ class Task
$aUsers[] = array('aas_uid' => $aRow['USR_UID'], $aUsers[] = array('aas_uid' => $aRow['USR_UID'],
'aas_name' => $aRow['USR_FIRSTNAME'], 'aas_name' => $aRow['USR_FIRSTNAME'],
'aas_lastname' => $aRow['USR_LASTNAME'], 'aas_lastname' => $aRow['USR_LASTNAME'],
'aas_username' => $aRow['USR_USERNAME'], 'aas_username' => $aRow['USR_USERNAME'],
'aas_type' => "user" ); 'aas_type' => "user" );
$oDataset->next(); $oDataset->next();
} }
@@ -684,7 +683,7 @@ class Task
'aas_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $results['GRP_TITLE'] . 'aas_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $results['GRP_TITLE'] .
' (' . $aRow2['MEMBERS_NUMBER'] . ' (' . $aRow2['MEMBERS_NUMBER'] .
' ' . ((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')) . ' ' . ((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')) .
')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']), ')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']),
'aas_lastname' => "", 'aas_lastname' => "",
'aas_username' => "", 'aas_username' => "",
'aas_type' => "group" ); 'aas_type' => "group" );
@@ -773,7 +772,7 @@ class Task
'aas_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $aRow['GRP_TITLE'] . 'aas_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $aRow['GRP_TITLE'] .
' (' . $aRow2['MEMBERS_NUMBER'] . ' (' . $aRow2['MEMBERS_NUMBER'] .
' ' . ((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')) . ' ' . ((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')) .
')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']), ')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']),
'aas_lastname' => "", 'aas_lastname' => "",
'aas_username' => "", 'aas_username' => "",
'aas_type' => "group" ); 'aas_type' => "group" );
@@ -810,7 +809,6 @@ class Task
} }
} }
/** /**
* Assign a user or group to an activity * Assign a user or group to an activity
* *
@@ -829,14 +827,14 @@ class Task
$iType = 1; $iType = 1;
$oTaskUser = new \TaskUser(); $oTaskUser = new \TaskUser();
if ($sRelation == 1) { if ($sRelation == 1) {
$oTaskUser->create(array('TAS_UID' => $sTaskUID, $oTaskUser->create(array('TAS_UID' => $sTaskUID,
'USR_UID' => $sAssigneeUID, 'USR_UID' => $sAssigneeUID,
'TU_TYPE' => $iType, 'TU_TYPE' => $iType,
'TU_RELATION' => $sRelation)); 'TU_RELATION' => $sRelation));
return array('aas_uid' => $sAssigneeUID, return array('aas_uid' => $sAssigneeUID,
'aas_type' => "user"); 'aas_type' => "user");
} else { } else {
$oTaskUser->create(array('TAS_UID' => $sTaskUID, $oTaskUser->create(array('TAS_UID' => $sTaskUID,
'USR_UID' => $sAssigneeUID, 'USR_UID' => $sAssigneeUID,
'TU_TYPE' => $iType, 'TU_TYPE' => $iType,
'TU_RELATION' => $sRelation)); 'TU_RELATION' => $sRelation));
@@ -863,18 +861,16 @@ class Task
try { try {
$iType = 1; $iType = 1;
$oTaskUser = new \TaskUser(); $oTaskUser = new \TaskUser();
if ($sRelation == 1) { if ($sRelation == 1) {
$oTaskUser->remove($sTaskUID, $sAssigneeUID, $iType, $sRelation); $oTaskUser->remove($sTaskUID, $sAssigneeUID, $iType, $sRelation);
} else { } else {
$oTaskUser->remove($sTaskUID, $sAssigneeUID, $iType, $sRelation); $oTaskUser->remove($sTaskUID, $sAssigneeUID, $iType, $sRelation);
} }
} catch (Exception $e) { } catch (Exception $e) {
throw $e; throw $e;
} }
} }
/** /**
@@ -957,7 +953,7 @@ class Task
$aUsers[] = array('aas_uid' => $aRow['USR_UID'], $aUsers[] = array('aas_uid' => $aRow['USR_UID'],
'aas_name' => $aRow['USR_FIRSTNAME'], 'aas_name' => $aRow['USR_FIRSTNAME'],
'aas_lastname' => $aRow['USR_LASTNAME'], 'aas_lastname' => $aRow['USR_LASTNAME'],
'aas_username' => $aRow['USR_USERNAME'], 'aas_username' => $aRow['USR_USERNAME'],
'aas_type' => "user" ); 'aas_type' => "user" );
$oDataset->next(); $oDataset->next();
} }
@@ -1016,7 +1012,7 @@ class Task
'aas_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $results['GRP_TITLE'] . 'aas_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $results['GRP_TITLE'] .
' (' . $aRow2['MEMBERS_NUMBER'] . ' (' . $aRow2['MEMBERS_NUMBER'] .
' ' . ((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')) . ' ' . ((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')) .
')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']), ')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']),
'aas_lastname' => "", 'aas_lastname' => "",
'aas_username' => "", 'aas_username' => "",
'aas_type' => "group" ); 'aas_type' => "group" );
@@ -1050,7 +1046,7 @@ class Task
/** /**
* Return a single Adhoc user or group assigned to an activity * Return a single Adhoc user or group assigned to an activity
* *
* @param string $sProcessUID * @param string $sProcessUID
* @param string $sTaskUID * @param string $sTaskUID
* @param string $sAssigneeUID * @param string $sAssigneeUID
@@ -1105,7 +1101,7 @@ class Task
'aas_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $aRow['GRP_TITLE'] . 'aas_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $aRow['GRP_TITLE'] .
' (' . $aRow2['MEMBERS_NUMBER'] . ' (' . $aRow2['MEMBERS_NUMBER'] .
' ' . ((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')) . ' ' . ((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')) .
')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']), ')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']),
'aas_lastname' => "", 'aas_lastname' => "",
'aas_username' => "", 'aas_username' => "",
'aas_type' => "group" ); 'aas_type' => "group" );
@@ -1161,16 +1157,16 @@ class Task
$iType = 2; $iType = 2;
$oTaskUser = new \TaskUser(); $oTaskUser = new \TaskUser();
if ($sRelation == 1) { if ($sRelation == 1) {
$oTaskUser->create(array('TAS_UID' => $sTaskUID, $oTaskUser->create(array('TAS_UID' => $sTaskUID,
'USR_UID' => $sAssigneeUID, 'USR_UID' => $sAssigneeUID,
'TU_TYPE' => $iType, 'TU_TYPE' => $iType,
'TU_RELATION' => $sRelation)); 'TU_RELATION' => $sRelation));
return array('aas_uid' => $sAssigneeUID, return array('aas_uid' => $sAssigneeUID,
'aas_type' => "user"); 'aas_type' => "user");
} else { } else {
$oTaskUser->create(array('TAS_UID' => $sTaskUID, $oTaskUser->create(array('TAS_UID' => $sTaskUID,
'USR_UID' => $sAssigneeUID, 'USR_UID' => $sAssigneeUID,
'TU_TYPE' => $iType, 'TU_TYPE' => $iType,
'TU_RELATION' => $sRelation)); 'TU_RELATION' => $sRelation));
return array('aas_uid' => $sAssigneeUID, return array('aas_uid' => $sAssigneeUID,
'aas_type' => "group"); 'aas_type' => "group");