|
From: Greg M. <bli...@us...> - 2008-09-16 04:02:17
|
Update of /cvsroot/phpwebsite-comm/modules/mailinglists/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3765/class Modified Files: Email.php List.php Log Message: Fixed issue sending emails with apostrophe in from or subject. Index: List.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/mailinglists/class/List.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** List.php 2 Jan 2008 21:59:25 -0000 1.1 --- List.php 16 Sep 2008 04:02:23 -0000 1.2 *************** *** 219,225 **** function getFromName($format=true) { ! if ($format) { ! return PHPWS_Text::parseOutput($this->from_name); } --- 219,226 ---- function getFromName($format=true) { ! /* Do not call parseOutput here! Breaks the sending of emails. */ ! if (($format) && !defined(ALLOW_PROFANITY)) { ! return PHPWS_Text::profanityFilter(PHPWS_Text::decodeText($this->from_name)); } *************** *** 248,254 **** function getSubjectPrefix($format=true) { ! if ($format) { ! return PHPWS_Text::parseOutput($this->subject_prefix); } --- 249,256 ---- function getSubjectPrefix($format=true) { ! /* Do not call parseOutput here! Breaks the sending of emails. */ ! if (($format) && !defined(ALLOW_PROFANITY)) { ! return PHPWS_Text::profanityFilter(PHPWS_Text::decodeText($this->subject_prefix)); } Index: Email.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/mailinglists/class/Email.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Email.php 23 Aug 2008 17:03:16 -0000 1.5 --- Email.php 16 Sep 2008 04:02:23 -0000 1.6 *************** *** 304,313 **** $mail = new PHPWS_Mail; $mail->addSendTo($send_to); ! $mail->setFrom($list->getFromName() . ' <' . $list->getFromEmail() . '>'); /* If the email is a list_id of 0, it means this is not a mass mailing, rather a module email. */ if ($this->getListId() == 0) { ! $mail->setSubject($this->getSubject()); $mail->setMessageBody($this->getMsgText()); } --- 304,313 ---- $mail = new PHPWS_Mail; $mail->addSendTo($send_to); ! $mail->setFrom('"' . $list->getFromName() . '" <' . $list->getFromEmail() . '>'); /* If the email is a list_id of 0, it means this is not a mass mailing, rather a module email. */ if ($this->getListId() == 0) { ! $mail->setSubject($this->getSubject(false)); $mail->setMessageBody($this->getMsgText()); } *************** *** 317,325 **** if (PHPWS_Settings::get('mailinglists', 'subject_prefix')) { ! $mail->setSubject($list->getSubjectPrefix() . ' ' . $this->getSubject()); } else { ! $mail->setSubject($this->getSubject()); } --- 317,325 ---- if (PHPWS_Settings::get('mailinglists', 'subject_prefix')) { ! $mail->setSubject($list->getSubjectPrefix() . ' ' . $this->getSubject(false)); } else { ! $mail->setSubject($this->getSubject(false)); } |