CRM-17908: more fixes
authoryashodha <yashodha.chaku@webaccessglobal.com>
Thu, 4 Feb 2016 10:36:03 +0000 (16:06 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Thu, 4 Feb 2016 10:36:03 +0000 (16:06 +0530)
----------------------------------------
* CRM-17908: text version of header/footer not used when auto-generating text version of email
  https://issues.civicrm.org/jira/browse/CRM-17908

CRM/Mailing/BAO/Mailing.php

index 0a9ce2ef1f877228e1e476c51684a44d5bc9b778..58d4f00de22f4205608eb4ba76497c8c5194ee1c 100644 (file)
@@ -763,7 +763,7 @@ ORDER BY   i.contact_id, i.{$tempColumn}
         if (!empty($this->header->body_text)) {
           $template[] = $this->header->body_text;
         }
-        else {
+        elseif (!empty($this->header->body_html)) {
           $template[] = CRM_Utils_String::htmlToText($this->header->body_html);
         }
 
@@ -777,7 +777,7 @@ ORDER BY   i.contact_id, i.{$tempColumn}
         if (!empty($this->footer->body_text)) {
           $template[] = $this->footer->body_text;
         }
-        else {
+        elseif (!empty($this->footer->body_html)) {
           $template[] = CRM_Utils_String::htmlToText($this->footer->body_html);
         }