From 6f7d5a1fecedd29fe33c708e45015015d0b1372b Mon Sep 17 00:00:00 2001 From: Michael McAndrew Date: Fri, 8 Dec 2017 11:54:31 +0000 Subject: [PATCH] only create 'template' for plain text version if plain text has been submitted --- CRM/Mailing/BAO/Mailing.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 27ca60dda6..361b7690c0 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -767,7 +767,7 @@ ORDER BY {$orderBy} if (!$this->templates) { $this->getHeaderFooter(); $this->templates = array(); - if ($this->body_text || !empty($this->header)) { + if ($this->body_text) { $template = array(); if (!empty($this->header->body_text)) { $template[] = $this->header->body_text; @@ -776,12 +776,7 @@ ORDER BY {$orderBy} $template[] = CRM_Utils_String::htmlToText($this->header->body_html); } - if ($this->body_text) { - $template[] = $this->body_text; - } - else { - $template[] = CRM_Utils_String::htmlToText($this->body_html); - } + $template[] = $this->body_text; if (!empty($this->footer->body_text)) { $template[] = $this->footer->body_text; -- 2.25.1