PMCORE-3943
This commit is contained in:
@@ -39,7 +39,7 @@ if ($RBAC->userCanAccess('PM_CASES') != 1) {
|
||||
|
||||
$caseInstance = new Cases();
|
||||
|
||||
//cleaning the case session data
|
||||
// Cleaning the case session data
|
||||
Cases::clearCaseSessionData();
|
||||
|
||||
try {
|
||||
@@ -58,14 +58,14 @@ try {
|
||||
$_GET['DEL_INDEX'] = $caseInstance->getCurrentDelegation($_GET['APP_UID'], $_SESSION['USER_LOGGED']);
|
||||
}
|
||||
|
||||
//if the application doesn't exist
|
||||
// If the application doesn't exist
|
||||
if (is_null($_GET['APP_UID'])) {
|
||||
G::SendMessageText(G::LoadTranslation('ID_CASE_DOES_NOT_EXISTS'), 'info');
|
||||
G::header('location: casesListExtJs');
|
||||
exit();
|
||||
}
|
||||
|
||||
//if the application exists but the
|
||||
// If the application exists but the
|
||||
if (is_null($_GET['DEL_INDEX'])) {
|
||||
G::SendMessageText(G::LoadTranslation('ID_CASE_IS_CURRENTLY_WITH_ANOTHER_USER'), 'info');
|
||||
G::header('location: casesListExtJs');
|
||||
@@ -77,7 +77,7 @@ try {
|
||||
$delIndex = $_GET['DEL_INDEX'];
|
||||
$action = isset($_GET['action']) ? $_GET['action'] : '';
|
||||
|
||||
//loading application data
|
||||
// Loading application data
|
||||
$fieldCase = $caseInstance->loadCase($appUid, $delIndex);
|
||||
|
||||
if (!Process::isActive($fieldCase['PRO_UID'], 'PRO_UID')) {
|
||||
@@ -113,7 +113,11 @@ try {
|
||||
$caseSubprocessPending = $subAppData->isSubProcessWithCasePending($appUid, $delIndex);
|
||||
|
||||
if ($isPaused || $caseSubprocessPending) {
|
||||
//the case is paused show only the resume
|
||||
// Set as read when the pause thread or subprocess was open
|
||||
if (is_null($fieldCase['DEL_INIT_DATE'])) {
|
||||
$caseInstance->setDelInitDate($appUid, $delIndex);
|
||||
}
|
||||
// The case is paused show only the resume
|
||||
$_SESSION['APPLICATION'] = $appUid;
|
||||
$_SESSION['INDEX'] = $delIndex;
|
||||
$_SESSION['PROCESS'] = $fieldCase['PRO_UID'];
|
||||
@@ -129,11 +133,9 @@ try {
|
||||
* these routine is to verify if the case was acceded from advanced search list
|
||||
*/
|
||||
if ($action == 'search') {
|
||||
//verify if the case is with the current user
|
||||
// Verify if the case is with the current user
|
||||
$delegationUsers = AppDelegation::getCurrentUsers($appUid, $delIndex);
|
||||
if ($delegationUsers['USR_UID'] !== $_SESSION['USER_LOGGED'] && !empty($delegationUsers['USR_UID'])) {
|
||||
//distinct "" for selfservice
|
||||
//so we show just the resume
|
||||
$_SESSION['alreadyDerivated'] = true;
|
||||
$_SESSION['APPLICATION'] = $appUid;
|
||||
$_SESSION['INDEX'] = $delIndex;
|
||||
@@ -213,7 +215,7 @@ try {
|
||||
// We need to use the index sent with the corresponding record
|
||||
$_SESSION['INDEX'] = $delIndex;
|
||||
} else {
|
||||
//Get DEL_INDEX
|
||||
// Get last DEL_INDEX
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
|
||||
$criteria->add(AppDelegationPeer::APP_UID, $appUid);
|
||||
@@ -231,7 +233,7 @@ try {
|
||||
require_once(PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
|
||||
}
|
||||
break;
|
||||
default: //APP_STATUS IS COMPLETED OR CANCELLED
|
||||
default: // APP_STATUS in (COMPLETED, CANCELLED)
|
||||
$_SESSION['APPLICATION'] = $appUid;
|
||||
$_SESSION['INDEX'] = $caseInstance->getCurrentDelegationCase($_GET['APP_UID']);
|
||||
$_SESSION['PROCESS'] = $fieldCase['PRO_UID'];
|
||||
|
||||
Reference in New Issue
Block a user