From: Barbara Miller Date: Thu, 12 Nov 2015 01:20:02 +0000 (-0800) Subject: CRM-17548 - Thank-you e-mail fails to include message template subject X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ab0f580c8b5407474c482ea20ca668563385e816;p=civicrm-core.git CRM-17548 - Thank-you e-mail fails to include message template subject CRM-17548 - Thank-you e-mail fails to include message template subject, sends only default https://issues.civicrm.org/jira/browse/CRM-17548 --- diff --git a/CRM/Contribute/Form/Task/PDFLetterCommon.php b/CRM/Contribute/Form/Task/PDFLetterCommon.php index 9e36d0db25..69e252e733 100644 --- a/CRM/Contribute/Form/Task/PDFLetterCommon.php +++ b/CRM/Contribute/Form/Task/PDFLetterCommon.php @@ -334,7 +334,6 @@ class CRM_Contribute_Form_Task_PDFLetterCommon extends CRM_Contact_Form_Task_PDF $defaults = array( 'toName' => $contact['display_name'], 'toEmail' => $contact['email'], - 'subject' => ts('Thank you for your contribution/s'), 'text' => '', 'html' => $html, ); @@ -343,6 +342,12 @@ class CRM_Contribute_Form_Task_PDFLetterCommon extends CRM_Contact_Form_Task_PDF $emails = array_keys($emails); $defaults['from'] = array_pop($emails); } + if (!empty($params['subject'])) { + $defaults['subject'] => $params['subject']; + } + else { + $defaults['subject'] => ts('Thank you for your contribution/s'); + } if ($is_pdf) { $defaults['html'] = ts('Please see attached'); $defaults['attachments'] = array(CRM_Utils_Mail::appendPDF('ThankYou.pdf', $html, $format));