From d8e93b7ca18ffa1fa6431a070cdc429c17c9e095 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 25 Sep 2021 07:50:03 +1200 Subject: [PATCH] Remove broken code I don't even know what this is supposed to do - but since the function has been missing for our entire git history it must be unreachable. https://github.com/civicrm/civicrm-core/blob/4d5c2eb510a6be0017085d1f8dae09495e28e74b/CRM/Contact/BAO/SearchCustom.php --- CRM/Mailing/BAO/Mailing.php | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/CRM/Mailing/BAO/Mailing.php b/CRM/Mailing/BAO/Mailing.php index 2c95b259de..3270945ca2 100644 --- a/CRM/Mailing/BAO/Mailing.php +++ b/CRM/Mailing/BAO/Mailing.php @@ -304,25 +304,10 @@ class CRM_Mailing_BAO_Mailing extends CRM_Mailing_DAO_Mailing { ->execute(); } - // Construct the filtered search queries. - $dao = CRM_Utils_SQL_Select::from('civicrm_mailing_group') - ->select('search_id, search_args, entity_id') - ->where('search_id IS NOT NULL AND mailing_id = #mailingID') - ->param('#mailingID', $mailingID) - ->execute(); - while ($dao->fetch()) { - $customSQL = CRM_Contact_BAO_SearchCustom::civiMailSQL($dao->search_id, - $dao->search_args, - $dao->entity_id - ); - $query = "REPLACE INTO {$includedTempTablename} ($entityColumn, contact_id) {$customSQL} "; - $mailingGroup->query($query); - } - list($aclFrom, $aclWhere) = CRM_Contact_BAO_Contact_Permission::cacheClause(); // clear all the mailing recipients before populating - CRM_Core_DAO::executeQuery(" DELETE FROM civicrm_mailing_recipients WHERE mailing_id = %1 ", [ + CRM_Core_DAO::executeQuery(' DELETE FROM civicrm_mailing_recipients WHERE mailing_id = %1 ', [ 1 => [ $mailingID, 'Integer', -- 2.25.1