BUG 9935 "DEL_INDEX PM Table Value" SOLVED
- Every time I send E-mails with PMFSendMessage() function, it doesn't keep a track in DEL_INDEX field from APP_MESSAGE table - Added parameter $delIndex to the function * Available from version 2.0.46
This commit is contained in:
@@ -786,12 +786,25 @@ function getEmailConfiguration ()
|
||||
* @param string(32) | $sTemplate | Name of the template | The name of the template file in plain text or HTML format which will produce the body of the email.
|
||||
* @param array | $aFields | An optional associative array | Optional parameter. An associative array where the keys are the variable names and the values are the variables' values.
|
||||
* @param array | $aAttachment | Attachment | An Optional arrray. An array of files (full paths) to be attached to the email.
|
||||
* @param boolean | $showMessage = true | Show message | Optional parameter.
|
||||
* @param int | $delIndex = 0 | Delegation index of the case | Optional parameter. The delegation index of the current task in the case.
|
||||
* @return int | $result | result | Result of sending email
|
||||
*
|
||||
*/
|
||||
//@param array | $aFields=array() | An associative array optional | Optional parameter. An associative array where the keys are the variable name and the values are the variable's value.
|
||||
function PMFSendMessage ($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $aFields = array(), $aAttachment = array(), $showMessage = true)
|
||||
{
|
||||
function PMFSendMessage(
|
||||
$caseId,
|
||||
$sFrom,
|
||||
$sTo,
|
||||
$sCc,
|
||||
$sBcc,
|
||||
$sSubject,
|
||||
$sTemplate,
|
||||
$aFields = array(),
|
||||
$aAttachment = array(),
|
||||
$showMessage = true,
|
||||
$delIndex = 0
|
||||
) {
|
||||
global $oPMScript;
|
||||
|
||||
if (isset( $oPMScript->aFields ) && is_array( $oPMScript->aFields )) {
|
||||
@@ -802,9 +815,22 @@ function PMFSendMessage ($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTempla
|
||||
}
|
||||
}
|
||||
|
||||
G::LoadClass( 'wsBase' );
|
||||
G::LoadClass("wsBase");
|
||||
|
||||
$ws = new wsBase();
|
||||
$result = $ws->sendMessage( $caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $aFields, $aAttachment, $showMessage);
|
||||
$result = $ws->sendMessage(
|
||||
$caseId,
|
||||
$sFrom,
|
||||
$sTo,
|
||||
$sCc,
|
||||
$sBcc,
|
||||
$sSubject,
|
||||
$sTemplate,
|
||||
$aFields,
|
||||
$aAttachment,
|
||||
$showMessage,
|
||||
$delIndex
|
||||
);
|
||||
|
||||
if ($result->status_code == 0) {
|
||||
return 1;
|
||||
|
||||
@@ -729,10 +729,24 @@ class wsBase
|
||||
* @param string $sSubject
|
||||
* @param string $sTemplate
|
||||
* @param $appFields = null
|
||||
* @param $aAttachment = null
|
||||
* @param boolean $showMessage = true
|
||||
* @param int $delIndex = 0
|
||||
* @return $result will return an object
|
||||
*/
|
||||
public function sendMessage ($caseId, $sFrom, $sTo, $sCc, $sBcc, $sSubject, $sTemplate, $appFields = null, $aAttachment = null, $showMessage = true)
|
||||
{
|
||||
public function sendMessage(
|
||||
$caseId,
|
||||
$sFrom,
|
||||
$sTo,
|
||||
$sCc,
|
||||
$sBcc,
|
||||
$sSubject,
|
||||
$sTemplate,
|
||||
$appFields = null,
|
||||
$aAttachment = null,
|
||||
$showMessage = true,
|
||||
$delIndex = 0
|
||||
) {
|
||||
try {
|
||||
G::loadClass( 'system' );
|
||||
|
||||
@@ -789,7 +803,21 @@ class wsBase
|
||||
}
|
||||
$showMessage = ($showMessage) ? 1 : 0 ;
|
||||
|
||||
$messageArray = array ('msg_uid' => '','app_uid' => $caseId,'del_index' => 0,'app_msg_type' => 'TRIGGER','app_msg_subject' => $sSubject,'app_msg_from' => $sFrom,'app_msg_to' => $sTo,'app_msg_body' => $sBody,'app_msg_cc' => $sCc,'app_msg_bcc' => $sBcc,'app_msg_attach' => $aAttachment,'app_msg_template' => '','app_msg_status' => 'pending', 'app_msg_show_message' => $showMessage
|
||||
$messageArray = array(
|
||||
"msg_uid" => "",
|
||||
"app_uid" => $caseId,
|
||||
"del_index" => $delIndex,
|
||||
"app_msg_type" => "TRIGGER",
|
||||
"app_msg_subject" => $sSubject,
|
||||
"app_msg_from" => $sFrom,
|
||||
"app_msg_to" => $sTo,
|
||||
"app_msg_body" => $sBody,
|
||||
"app_msg_cc" => $sCc,
|
||||
"app_msg_bcc" => $sBcc,
|
||||
"app_msg_attach" => $aAttachment,
|
||||
"app_msg_template" => "",
|
||||
"app_msg_status" => "pending",
|
||||
"app_msg_show_message" => $showMessage
|
||||
);
|
||||
|
||||
$oSpool->create( $messageArray );
|
||||
|
||||
Reference in New Issue
Block a user