From be901202b4d6f7c98343c5240c3560f64476c986 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 27 Mar 2020 17:11:41 +1300 Subject: [PATCH] Remove unused code If seems to me that 1) if this IF is true then there will be a bounce & it will not proceed annd 2 if it IS true emailAddress does not seem to be applied anywhere --- CRM/Contact/Form/Task/EmailCommon.php | 8 +------- templates/CRM/Contact/Form/Task/Email.tpl | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/CRM/Contact/Form/Task/EmailCommon.php b/CRM/Contact/Form/Task/EmailCommon.php index e970aed4ef..10d38cb463 100644 --- a/CRM/Contact/Form/Task/EmailCommon.php +++ b/CRM/Contact/Form/Task/EmailCommon.php @@ -66,14 +66,8 @@ class CRM_Contact_Form_Task_EmailCommon { $fromEmailValues = CRM_Core_BAO_Email::getFromEmail(); - $form->_noEmails = FALSE; - if (empty($fromEmailValues)) { - $form->_noEmails = TRUE; - } - $form->assign('noEmails', $form->_noEmails); - if ($bounce) { - if ($form->_noEmails) { + if (empty($fromEmailValues)) { CRM_Core_Error::statusBounce(ts('Your user record does not have a valid email address and no from addresses have been configured.')); } } diff --git a/templates/CRM/Contact/Form/Task/Email.tpl b/templates/CRM/Contact/Form/Task/Email.tpl index d665a1b18f..825dfaf8bc 100644 --- a/templates/CRM/Contact/Form/Task/Email.tpl +++ b/templates/CRM/Contact/Form/Task/Email.tpl @@ -23,7 +23,7 @@ {if $single eq false}{ts}Recipient(s){/ts}{else}{$form.to.label}{/if} - {$form.to.html}{if $noEmails eq true}  {$form.emailAddress.html}{/if} + {$form.to.html} -- 2.25.1