Skip to content

Commit

Permalink
Deprecate meaningless parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Jan 11, 2023
1 parent 1d09560 commit 4355339
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
11 changes: 5 additions & 6 deletions ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,22 @@ public function summary() {
* @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,
$rowcount,
$sort
);
$this->validateUserSQL($sql);

if ($returnSQL) {
return $sql;
}

return CRM_Core_DAO::composeQuery($sql);
return $sql;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,7 @@ public function count() {
*/
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);
}

/**
Expand Down

0 comments on commit 4355339

Please sign in to comment.