Skip to content

Commit

Permalink
Merge pull request #17130 from jitendrapurohit/mail-62
Browse files Browse the repository at this point in the history
dev/mail#62 - Mailing Error when civicrm_mailing_group has duplicate …
  • Loading branch information
seamuslee001 authored May 4, 2020
2 parents 4038698 + 4052437 commit c90aa71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Mailing/BAO/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public static function getRecipients($mailingID) {
$mailingGroup = new CRM_Mailing_DAO_MailingGroup();
$recipientsGroup = $excludeSmartGroupIDs = $includeSmartGroupIDs = $priorMailingIDs = [];
$dao = CRM_Utils_SQL_Select::from('civicrm_mailing_group')
->select('GROUP_CONCAT(entity_id SEPARATOR ",") as group_ids, group_type, entity_table')
->select('GROUP_CONCAT(DISTINCT entity_id SEPARATOR ",") as group_ids, group_type, entity_table')
->where('mailing_id = #mailing_id AND entity_table RLIKE "^civicrm_(group.*|mailing)$" ')
->groupBy(['group_type', 'entity_table'])
->param('!groupTableName', CRM_Contact_BAO_Group::getTableName())
Expand Down

0 comments on commit c90aa71

Please sign in to comment.