HOR-1101, fix incorrect key used

This commit is contained in:
Julio Cesar Laura Avendaño
2016-08-17 11:32:28 -04:00
parent 7851e4ed49
commit 56736b7d2d

View File

@@ -2937,6 +2937,7 @@ class Cases
$oCases = new \Cases(); $oCases = new \Cases();
$appDelegation = new \AppDelegation(); $appDelegation = new \AppDelegation();
$casesToReassign = $data['cases']; $casesToReassign = $data['cases'];
$result = 0;
if (sizeof($casesToReassign)) { if (sizeof($casesToReassign)) {
foreach ($casesToReassign as $key => $val) { foreach ($casesToReassign as $key => $val) {
$usrUid = ''; $usrUid = '';
@@ -2952,14 +2953,14 @@ class Cases
} }
//Will be not able reassign a case when is paused //Will be not able reassign a case when is paused
$flagReassign = true; $flagReassign = true;
if (!\AppDelay::isPaused($val['APP_UID'], $val['INDEX'])) { if (\AppDelay::isPaused($val['APP_UID'], $val['DEL_INDEX'])) {
$dataResponse['cases'][$key]['result'] = 0; $dataResponse['cases'][$key]['result'] = 0;
$dataResponse['cases'][$key]['status'] = \G::LoadTranslation('ID_REASSIGNMENT_PAUSED_ERROR'); $dataResponse['cases'][$key]['status'] = \G::LoadTranslation('ID_REASSIGNMENT_PAUSED_ERROR');
$flagReassign = false; $flagReassign = false;
} }
//Current users of OPEN DEL_INDEX thread //Current users of OPEN DEL_INDEX thread
$aCurUser = $appDelegation->getCurrentUsers($val['APP_UID'], $val['INDEX']); $aCurUser = $appDelegation->getCurrentUsers($val['APP_UID'], $val['DEL_INDEX']);
if (!empty($aCurUser)) { if (!empty($aCurUser)) {
foreach ($aCurUser as $key => $value) { foreach ($aCurUser as $key => $value) {
if ($value === $data['usr_uid_target']) { if ($value === $data['usr_uid_target']) {