From 4355339478b770934b5c13015da1d18423cd0927 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 2 Jan 2023 16:00:06 +1300 Subject: [PATCH] Deprecate meaningless parameter --- .../CRM/Contact/Form/Search/Custom/Base.php | 11 +++++------ .../CRM/Contact/Form/Search/Custom/FullText.php | 8 +------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/Base.php b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/Base.php index 6c275cdc07..2ff571d5a2 100644 --- a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/Base.php +++ b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/Base.php @@ -69,10 +69,14 @@ class CRM_Contact_Form_Search_Custom_Base { * @param int $rowcount * @param null $sort * @param bool $returnSQL + * Deprecated parameter * * @return string */ public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL, $returnSQL = FALSE) { + if ($returnSQL) { + CRM_Core_Error::deprecatedWarning('do not pass returnSQL'); + } $sql = $this->sql( 'contact_a.id as contact_id', $offset, @@ -80,12 +84,7 @@ class CRM_Contact_Form_Search_Custom_Base { $sort ); $this->validateUserSQL($sql); - - if ($returnSQL) { - return $sql; - } - - return CRM_Core_DAO::composeQuery($sql); + return $sql; } /** diff --git a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/FullText.php b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/FullText.php index 2868194137..ae6eeec70c 100644 --- a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/FullText.php +++ b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/FullText.php @@ -449,13 +449,7 @@ WHERE t.table_name = 'Activity' AND */ public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL, $returnSQL = FALSE) { $this->initialize(); - - if ($returnSQL) { - return $this->all($offset, $rowcount, $sort, FALSE, TRUE); - } - else { - return CRM_Core_DAO::singleValueQuery("SELECT contact_id FROM {$this->tableName}"); - } + return $this->all($offset, $rowcount, $sort, FALSE, TRUE); } /** -- 2.25.1