From ce533803eedb35cfcbb58a6eadfbc1f0e9e820b7 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Fri, 30 Nov 2012 16:56:29 -0400 Subject: [PATCH] BUG 10103 PMFSendMessage with attachments SOLVED - Not checked the chain to create a record. - Was add verification. --- workflow/engine/classes/class.spool.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/workflow/engine/classes/class.spool.php b/workflow/engine/classes/class.spool.php index 406cbba94..0aed5db64 100755 --- a/workflow/engine/classes/class.spool.php +++ b/workflow/engine/classes/class.spool.php @@ -138,6 +138,10 @@ class spoolRun */ public function create ($aData) { + if (is_array($aData['app_msg_attach'])) { + $attachment = implode(",", $aData['app_msg_attach']); + $aData['app_msg_attach'] = $attachment; + } $aData['app_msg_show_message'] = (isset($aData['app_msg_show_message'])) ? $aData['app_msg_show_message'] : 1; $sUID = $this->db_insert( $aData ); @@ -300,7 +304,7 @@ class spoolRun $this->fileData['envelope_to'][] = "$val"; } } - } else if ($text != '') { + } elseif ($text != '') { $this->fileData['envelope_to'][] = "$text"; } else { $this->fileData['envelope_to'] = Array (); @@ -315,7 +319,7 @@ class spoolRun $this->fileData['envelope_cc'][] = "$valcc"; } } - } else if ($textcc != '') { + } elseif ($textcc != '') { $this->fileData['envelope_cc'][] = "$textcc"; } else { $this->fileData['envelope_cc'] = Array (); @@ -330,7 +334,7 @@ class spoolRun $this->fileData['envelope_bcc'][] = "$valbcc"; } } - } else if ($textbcc != '') { + } elseif ($textbcc != '') { $this->fileData['envelope_bcc'][] = "$textbcc"; } else { $this->fileData['envelope_bcc'] = Array (); @@ -542,10 +546,10 @@ class spoolRun if ($aConfiguration["MESS_ENABLED"] == "1") { require_once ("classes/model/AppMessage.php"); - if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) { - $aConfiguration['MESS_RAUTH'] = 0; - } else { - $aConfiguration['MESS_RAUTH'] = 1; + if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) { + $aConfiguration['MESS_RAUTH'] = 0; + } else { + $aConfiguration['MESS_RAUTH'] = 1; } $this->setConfig( array ("MESS_ENGINE" => $aConfiguration["MESS_ENGINE"],"MESS_SERVER" => $aConfiguration["MESS_SERVER"],"MESS_PORT" => $aConfiguration["MESS_PORT"],"MESS_ACCOUNT" => $aConfiguration["MESS_ACCOUNT"],"MESS_PASSWORD" => $aConfiguration["MESS_PASSWORD"],"SMTPAuth" => $aConfiguration["MESS_RAUTH"],"SMTPSecure" => $aConfiguration["SMTPSecure"]