Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
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
  • Loading branch information
eileenmcnaughton committed Mar 27, 2020
1 parent b590a8c commit be90120
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions CRM/Contact/Form/Task/EmailCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,8 @@ public static function preProcessFromAddress(&$form, $bounce = TRUE) {

$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.'));
}
}
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Contact/Form/Task/Email.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<tr class="crm-contactEmail-form-block-recipient">
<td class="label">{if $single eq false}{ts}Recipient(s){/ts}{else}{$form.to.label}{/if}</td>
<td>
{$form.to.html}{if $noEmails eq true}&nbsp;&nbsp;{$form.emailAddress.html}{/if}
{$form.to.html}
</td>
</tr>
<tr class="crm-contactEmail-form-block-cc_id" {if !$form.cc_id.value}style="display:none;"{/if}>
Expand Down

0 comments on commit be90120

Please sign in to comment.