Skip to content

Commit

Permalink
Merge pull request #21371 from eileenmcnaughton/depre
Browse files Browse the repository at this point in the history
Remove unused private function
  • Loading branch information
eileenmcnaughton authored Sep 5, 2021
2 parents 5099143 + 762f34e commit 7fb7d6b
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions CRM/Mailing/BAO/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,39 +449,6 @@ public static function getLocationFilterAndOrderBy($email_selection_method, $loc
return [$location_filter, $orderBy];
}

/**
* @param string $type
*
* @return array
*/
private function _getMailingGroupIds($type = 'Include') {
$mailingGroup = new CRM_Mailing_DAO_MailingGroup();
$group = CRM_Contact_DAO_Group::getTableName();
if (!isset($this->id)) {
// we're just testing tokens, so return any group
$query = "SELECT id AS entity_id
FROM $group
ORDER BY id
LIMIT 1";
}
else {
$mg = CRM_Mailing_DAO_MailingGroup::getTableName();
$query = "SELECT entity_id
FROM $mg
WHERE mailing_id = {$this->id}
AND group_type = '$type'
AND entity_table = '$group'";
}
$mailingGroup->query($query);

$groupIds = [];
while ($mailingGroup->fetch()) {
$groupIds[] = $mailingGroup->entity_id;
}

return $groupIds;
}

/**
* Returns the regex patterns that are used for preparing the text and html templates.
*
Expand Down

0 comments on commit 7fb7d6b

Please sign in to comment.