Skip to content

Commit

Permalink
Merge pull request #6013 from galgeek/email_null_is_deceased
Browse files Browse the repository at this point in the history
Update Mailing.php is_deceased queries
  • Loading branch information
Yashodha Chaku committed Jun 15, 2015
2 parents e49fe50 + 4d59d31 commit 46d035b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions CRM/Mailing/BAO/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public static function &getRecipients(
AND $g2contact.status = 'Added'
AND $contact.do_not_email = 0
AND $contact.is_opt_out = 0
AND $contact.is_deceased = 0
AND $contact.is_deceased <> 1
AND $location_filter
AND $email.email IS NOT NULL
AND $email.email != ''
Expand Down Expand Up @@ -343,7 +343,7 @@ public static function &getRecipients(
AND $g2contact.status = 'Added'
AND $contact.do_not_sms = 0
AND $contact.is_opt_out = 0
AND $contact.is_deceased = 0
AND $contact.is_deceased <> 1
AND $phone.phone_type_id = {$phoneTypes['Mobile']}
AND $phone.phone IS NOT NULL
AND $phone.phone != ''
Expand Down Expand Up @@ -372,7 +372,7 @@ public static function &getRecipients(
($mg.group_type = 'Include')
AND $contact.do_not_email = 0
AND $contact.is_opt_out = 0
AND $contact.is_deceased = 0
AND $contact.is_deceased <> 1
AND $location_filter
AND $email.on_hold = 0
AND $mg.mailing_id = {$mailing_id}
Expand All @@ -398,7 +398,7 @@ public static function &getRecipients(
($mg.group_type = 'Include')
AND $contact.do_not_sms = 0
AND $contact.is_opt_out = 0
AND $contact.is_deceased = 0
AND $contact.is_deceased <> 1
AND $phone.phone_type_id = {$phoneTypes['Mobile']}
AND $mg.mailing_id = {$mailing_id}
AND X_$job_id.contact_id IS null";
Expand Down Expand Up @@ -434,7 +434,7 @@ public static function &getRecipients(
WHERE gc.group_id = {$groupDAO->id}
AND c.do_not_email = 0
AND c.is_opt_out = 0
AND c.is_deceased = 0
AND c.is_deceased <> 1
AND $location_filter
AND civicrm_email.on_hold = 0
AND X_$job_id.contact_id IS null
Expand All @@ -451,7 +451,7 @@ public static function &getRecipients(
WHERE gc.group_id = {$groupDAO->id}
AND c.do_not_sms = 0
AND c.is_opt_out = 0
AND c.is_deceased = 0
AND c.is_deceased <> 1
AND p.phone_type_id = {$phoneTypes['Mobile']}
AND X_$job_id.contact_id IS null";
}
Expand Down Expand Up @@ -498,7 +498,7 @@ public static function &getRecipients(
AND $g2contact.status = 'Added'
AND $contact.do_not_email = 0
AND $contact.is_opt_out = 0
AND $contact.is_deceased = 0
AND $contact.is_deceased <> 1
AND $location_filter
AND $email.on_hold = 0
AND $mg.mailing_id = {$mailing_id}
Expand All @@ -523,7 +523,7 @@ public static function &getRecipients(
AND $g2contact.status = 'Added'
AND $contact.do_not_sms = 0
AND $contact.is_opt_out = 0
AND $contact.is_deceased = 0
AND $contact.is_deceased <> 1
AND $phone.phone_type_id = {$phoneTypes['Mobile']}
AND $mg.mailing_id = {$mailing_id}
AND X_$job_id.contact_id IS null";
Expand Down Expand Up @@ -939,7 +939,7 @@ public function getTestRecipients($testParams) {
WHERE (civicrm_email.is_bulkmail = 1 OR civicrm_email.is_primary = 1)
AND civicrm_contact.id = {$groupContact}
AND civicrm_contact.do_not_email = 0
AND civicrm_contact.is_deceased = 0
AND civicrm_contact.is_deceased <> 1
AND civicrm_email.on_hold = 0
AND civicrm_contact.is_opt_out = 0
GROUP BY civicrm_email.id
Expand Down

0 comments on commit 46d035b

Please sign in to comment.