Merged in release/3.2.4 (pull request #6537)
Update last changes from release/3.2.4 to release/3.3 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -1376,7 +1376,7 @@ class Cases
|
||||
* @param array $previousTasks, optional array that serves to trace the task routes and avoid infinite loops.
|
||||
* @return array, information about the threads in the case
|
||||
*/
|
||||
public function searchOpenPreviousTasks($taskUid, $appUid, $previousTasks = array())
|
||||
public function searchOpenPreviousTasks($taskUid, $appUid, &$previousTasks = array())
|
||||
{
|
||||
//In this array we are storing all open delegation rows.
|
||||
$threads = array();
|
||||
@@ -1408,7 +1408,7 @@ class Cases
|
||||
* @param array $previousTasks
|
||||
* @return array $taskReviewed
|
||||
*/
|
||||
public function getReviewedTasksRecursive($taskUid, $appUid, $previousTasks)
|
||||
public function getReviewedTasksRecursive($taskUid, $appUid, &$previousTasks)
|
||||
{
|
||||
$taskReviewed = array();
|
||||
$oCriteria = new Criteria('workflow');
|
||||
|
||||
@@ -163,6 +163,7 @@ switch ($actionAjax) {
|
||||
$spool->create([
|
||||
'msg_uid' => $data['MSG_UID'],
|
||||
'app_uid' => $data['APP_UID'],
|
||||
'app_number' => $data['APP_NUMBER'],
|
||||
'del_index' => $data['DEL_INDEX'],
|
||||
'app_msg_type' => $data['APP_MSG_TYPE'],
|
||||
'app_msg_subject' => $data['APP_MSG_SUBJECT'],
|
||||
|
||||
@@ -61,6 +61,7 @@ class EmailEvent
|
||||
$criteria->clearSelectColumns();
|
||||
$criteria->addSelectColumn(EmailServerPeer::MESS_UID);
|
||||
$criteria->addSelectColumn(EmailServerPeer::MESS_FROM_MAIL);
|
||||
$criteria->addSelectColumn(EmailServerPeer::MESS_FROM_NAME);
|
||||
$criteria->addSelectColumn(EmailServerPeer::MESS_ACCOUNT);
|
||||
$criteria->addSelectColumn(EmailServerPeer::MESS_ENGINE);
|
||||
$criteria->addAsColumn('UID', 'MESS_UID');
|
||||
@@ -71,11 +72,6 @@ class EmailEvent
|
||||
$row = $result->getRow();
|
||||
if (!empty($row['MESS_UID'])) {
|
||||
$row['EMAIL'] = $row['MESS_ACCOUNT'];
|
||||
$row['MESS_LABEL'] = EmailServer::getMessLabel(
|
||||
$row['MESS_ENGINE'],
|
||||
$row['MESS_ACCOUNT'],
|
||||
$row['MESS_FROM_MAIL']
|
||||
);
|
||||
$accounts[] = array_change_key_case($row, CASE_LOWER);
|
||||
}
|
||||
}
|
||||
@@ -107,14 +103,13 @@ class EmailEvent
|
||||
$row = $rsCriteria->getRow();
|
||||
$emailServer = new EmailServer();
|
||||
if ($row) {
|
||||
$row['MESS_LABEL'] = "";
|
||||
// We need to initialize these values in empty, in order to return always the same structure
|
||||
$row['MESS_ENGINE'] = $row['MESS_ACCOUNT'] = $row['MESS_FROM_MAIL'] = '';
|
||||
if (!empty($row['EMAIL_SERVER_UID'])) {
|
||||
$emailServerData = $emailServer->getEmailServer($row['EMAIL_SERVER_UID'], true);
|
||||
$row['MESS_LABEL'] = EmailServer::getMessLabel(
|
||||
$emailServerData['MESS_ENGINE'],
|
||||
$emailServerData['MESS_ACCOUNT'],
|
||||
$emailServerData['MESS_FROM_MAIL']
|
||||
);
|
||||
$row['MESS_ENGINE'] = $emailServerData['MESS_ENGINE'];
|
||||
$row['MESS_ACCOUNT'] = $emailServerData['MESS_ACCOUNT'];
|
||||
$row['MESS_FROM_MAIL'] = $emailServerData['MESS_FROM_MAIL'];
|
||||
}
|
||||
$row = array_change_key_case($row, CASE_LOWER);
|
||||
}
|
||||
|
||||
@@ -1375,26 +1375,5 @@ class EmailServer
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the value for MESS_LABEL
|
||||
*
|
||||
* @param string $engine, can be PHPMAILER|MAIL
|
||||
* @param string $senderAccount, related to the MESS_ACCOUNT
|
||||
* @param string $senderEmail, related to the MESS_FROM_MAIL
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getMessLabel($engine = 'PHPMAILER', $senderAccount = '', $senderEmail = '')
|
||||
{
|
||||
$messLabel = $senderEmail;
|
||||
if (empty($senderAccount) && $engine === 'MAIL') {
|
||||
$senderAccount = 'Mail (PHP)';
|
||||
}
|
||||
if (empty($senderEmail)) {
|
||||
$messLabel = $senderAccount;
|
||||
}
|
||||
|
||||
return $messLabel;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@
|
||||
var idMessage = rowSelected.data.ID_MESSAGE;
|
||||
var subjectMessage = rowSelected.data.APP_MSG_SUBJECT;
|
||||
var dateMessage = rowSelected.data.APP_MSG_DATE;
|
||||
var appNumber = rowSelected.data.APP_NUMBER;
|
||||
|
||||
var tabName = 'sendMailMessage_'+idMessage;
|
||||
var tabTitle = 'Resend('+subjectMessage+' '+dateMessage+')';
|
||||
@@ -124,7 +125,7 @@
|
||||
messageHistoryGridListMask = new Ext.LoadMask(Ext.getBody(), {msg:_('ID_LOADING')});
|
||||
messageHistoryGridListMask.show();
|
||||
|
||||
var url = "caseMessageHistory_Ajax.php?actionAjax=sendMailMessage_JXP&APP_UID="+APP_UID+"&APP_MSG_UID="+APP_MSG_UID;
|
||||
var url = "caseMessageHistory_Ajax.php?actionAjax=sendMailMessage_JXP&APP_UID=" + APP_UID + "&APP_MSG_UID=" + APP_MSG_UID + "&APP_NUMBER=" + appNumber;
|
||||
ajaxPostRequest(url,'caseMessageHistory_RSP');
|
||||
|
||||
}
|
||||
@@ -344,7 +345,8 @@ function caseMessageHistory_RSP (response, id) {
|
||||
{name: 'APP_MSG_TO'},
|
||||
{name: 'APP_MSG_STATUS'},
|
||||
{name: 'APP_MSG_BODY'},
|
||||
{name: 'MSGS_HISTORY'}
|
||||
{name: 'MSGS_HISTORY'},
|
||||
{name: 'APP_NUMBER'}
|
||||
|
||||
]
|
||||
})
|
||||
@@ -423,6 +425,7 @@ function caseMessageHistory_RSP (response, id) {
|
||||
{header: _("ID_STATUS"), dataIndex: 'APP_MSG_STATUS', width: 50},
|
||||
{header: _("ID_APP_MSG_BODY"), dataIndex: 'APP_MSG_BODY', width: 50,hidden:true},
|
||||
{id:'MSGS_HISTORY', dataIndex: 'MSGS_HISTORY', hidden:true, hideable:false},
|
||||
{id:'APP_NUMBER', dataIndex: 'APP_NUMBER', hidden:true, hideable:false},
|
||||
{
|
||||
xtype: 'actioncolumn',
|
||||
width: 60,
|
||||
|
||||
Reference in New Issue
Block a user