Skip to content

Commit 00a6789

Browse files
committed
refs #39156, do_not_notify when bulk add contact to event. correct typo
1 parent f6b1da0 commit 00a6789

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

CRM/Contribute/BAO/ContributionPage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ static function sendMail($contactID, &$values, $isTest = FALSE, $returnMessageTe
376376
$contactDetail = CRM_Contact_BAO_Contact::getContactDetails($contactID);
377377
if (isset($contactDeatil[5]) && !empty($contactDetail[5])) {
378378
CRM_Core_Error::debug_log_message("Skipped email notify {$sendTemplateParams['valueName']} for contact $contactID due to do_not_notify marked");
379-
$message = ts('Email has NOT been sent to %1 contact(s) - communication preferences specify DO NOT NOTIFY OR valid Email is NOT present. ', array(1 => '1'));
379+
$message = ts('Email has NOT been sent to %1 contact(s) - communication preferences specify DO NOT NOTIFY OR valid Email is NOT present.', array(1 => '1'));
380380
CRM_Core_Session::singleton()->setStatus($message);
381381
return;
382382
}

CRM/Event/BAO/Event.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ static function sendMail($contactID, &$values, $participantId, $isTest = FALSE,
12011201
$contactDetail = CRM_Contact_BAO_Contact::getContactDetails($contactID);
12021202
if (!empty($contactDetail[5])) {
12031203
CRM_Core_Error::debug_log_message("Skipped email notify {$sendTemplateParams['valueName']} for contact $contactID due to do_not_notify marked");
1204-
$message = ts('Email has NOT been sent to %1 contact(s) - communication preferences specify DO NOT NOTIFY OR valid Email is NOT present. ', array(1 => '1'));
1204+
$message = ts('Email has NOT been sent to %1 contact(s) - communication preferences specify DO NOT NOTIFY OR valid Email is NOT present.', array(1 => '1'));
12051205
CRM_Core_Session::singleton()->setStatus($message);
12061206
return;
12071207
}

CRM/Event/BAO/Participant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ static function sendTransitionParticipantMail($participantId,
15241524
if (isset($contactDeatil[5]) && !empty($contactDetail[5])) {
15251525
$mtype = strtolower($mailType);
15261526
CRM_Core_Error::debug_log_message("Skipped email notify participant_{$mtype} for contact {$participantValues['contact_id']} due to do_not_notify marked");
1527-
$message = ts('Email has NOT been sent to %1 contact(s) - communication preferences specify DO NOT NOTIFY OR valid Email is NOT present. ', array(1 => '1'));
1527+
$message = ts('Email has NOT been sent to %1 contact(s) - communication preferences specify DO NOT NOTIFY OR valid Email is NOT present.', array(1 => '1'));
15281528
CRM_Core_Session::singleton()->setStatus($message);
15291529
return;
15301530
}

CRM/Event/Form/Participant.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,10 @@ public function postProcess() {
16651665
$this->_contributorDisplayName = $contactDetails[0];
16661666
$this->_contributorEmail = $contactDetails[1];
16671667
$this->_toDoNotNotify = $contactDetails[5];
1668+
if (!empty($this->_toDoNotNotify)) {
1669+
$notSent[] = $contactID;
1670+
continue;
1671+
}
16681672

16691673
$this->_contributorDisplayName = ($this->_contributorDisplayName == ' ') ? $this->_contributorEmail : $this->_contributorDisplayName;
16701674
$this->assign('contactID', $contactID);
@@ -1809,10 +1813,10 @@ public function postProcess() {
18091813
else {
18101814
$statusMsg = ts('Total Participant(s) added to event: %1.', array(1 => count($this->_contactIds)));
18111815
if (count($notSent) > 0) {
1812-
$statusMsg .= ' ' . ts('Email has NOT been sent to %1 contact(s) - communication preferences specify DO NOT EMAIL OR valid Email is NOT present. ', array(1 => count($notSent)));
1816+
$statusMsg .= '<br>' . ts('Email has NOT been sent to %1 contact(s) - communication preferences specify DO NOT NOTIFY OR valid Email is NOT present.', array(1 => count($notSent)));
18131817
}
18141818
elseif (isset($params['send_receipt'])) {
1815-
$statusMsg .= ' ' . ts('A confirmation email has been scheduled to sent to ALL participants');
1819+
$statusMsg .= '<br>' . ts('A confirmation email has been scheduled to sent to ALL participants');
18161820
}
18171821
}
18181822
}

0 commit comments

Comments
 (0)