Skip to content

Commit

Permalink
Merge pull request #12 from dlobo/CRM-12003
Browse files Browse the repository at this point in the history
Fix for CRM-12003
  • Loading branch information
totten committed Mar 3, 2013
2 parents 5af3d50 + 043b025 commit 50a067f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions CRM/Contact/Form/Task/EmailCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,8 @@ static function preProcessFromAddress(&$form) {

foreach ($contactEmails as $emailId => $item) {
$email = $item['email'];
if (!$email &&
(count($emails) <= 1)
) {
$emails[$emailId] = '"' . $fromDisplayName . '"';
if (!$email && (count($emails) < 1)) {
// set it if no emails are present at all
$form->_noEmails = TRUE;
}
else {
Expand All @@ -86,11 +84,11 @@ static function preProcessFromAddress(&$form) {

$emails[$emailId] = '"' . $fromDisplayName . '" <' . $email . '> ';
$form->_onHold[$emailId] = $item['on_hold'];
$form->_noEmails = FALSE;
}
}

$form->_emails[$emailId] = $emails[$emailId];

$emails[$emailId] .= $item['locationType'];

if ($item['is_primary']) {
Expand Down

0 comments on commit 50a067f

Please sign in to comment.