diff --git a/workflow/engine/methods/cases/caseMessageHistory_Ajax.php b/workflow/engine/methods/cases/caseMessageHistory_Ajax.php index 55a357931..73fbcc018 100644 --- a/workflow/engine/methods/cases/caseMessageHistory_Ajax.php +++ b/workflow/engine/methods/cases/caseMessageHistory_Ajax.php @@ -58,23 +58,36 @@ if ($actionAjax == 'messageHistoryGridList_JXP') { $delIndex = array(); $respMess = ""; - if (count($respView['MSGS_HISTORY'])>0) { - $respMess = $respView['MSGS_HISTORY']['PERMISSION']; - $delIndex = $respView['MSGS_HISTORY']['DEL_INDEX']; + + if (count($respView["MSGS_HISTORY"]) > 0) { + $respMess = $respView["MSGS_HISTORY"]["PERMISSION"]; + + if (isset($respView["MSGS_HISTORY"]["DEL_INDEX"])) { + $delIndex = $respView["MSGS_HISTORY"]["DEL_INDEX"]; + } + } else { - if (count($respBlock['MSGS_HISTORY'])>0) { - $respMess = $respBlock['MSGS_HISTORY']['PERMISSION']; - $delIndex = $respView['MSGS_HISTORY']['DEL_INDEX']; + if (count($respBlock["MSGS_HISTORY"]) > 0) { + $respMess = $respBlock["MSGS_HISTORY"]["PERMISSION"]; + + if (isset($respBlock["MSGS_HISTORY"]["DEL_INDEX"])) { + $delIndex = $respBlock["MSGS_HISTORY"]["DEL_INDEX"]; + } + } else { - if (count($respResend['MSGS_HISTORY'])>0) { - $respMess = $respResend['MSGS_HISTORY']['PERMISSION']; - $delIndex = $respView['MSGS_HISTORY']['DEL_INDEX']; + if (count($respResend["MSGS_HISTORY"]) > 0) { + + $respMess = $respResend["MSGS_HISTORY"]["PERMISSION"]; + + if (isset($respBlock["MSGS_HISTORY"]["DEL_INDEX"])) { + $delIndex = $respBlock["MSGS_HISTORY"]["DEL_INDEX"]; + } } } } foreach ($appMessageArray as $index => $value) { - if (($appMessageArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1 && $respMess != 'BLOCK' ) && + if (($appMessageArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1 && $respMess != 'BLOCK' ) && ($appMessageArray[$index]['DEL_INDEX'] == 0 || in_array($appMessageArray[$index]['DEL_INDEX'], $delIndex ))) { $appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'] . '_' . $appMessageArray[$index]['APP_MSG_UID']; if ($respMess == 'BLOCK' || $respMess == '') {