From dca9c5bc981f927e43e99f24ec1a07ed67374f25 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 30 Mar 2020 08:23:33 +1100 Subject: [PATCH] Remove code handling for profile search listing --- CRM/Contact/BAO/Query.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 5cf62c9d94..5dab66c8d5 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -4050,25 +4050,15 @@ WHERE $smartGroupClause */ public function privacy(&$values) { list($name, $op, $value, $grouping) = $values; - //fixed for profile search listing CRM-4633 if (is_array($value)) { if (in_array(key($value), CRM_Core_DAO::acceptedSQLOperators(), TRUE)) { $op = key($value); $value = $value[$op]; } } - if (strpbrk($value, "[")) { - $value = CRM_Core_DAO::escapeString($value); - if (in_array("!{$op}", CRM_Core_DAO::acceptedSQLOperators(), TRUE)) { - $op = "!{$op}"; - $this->_where[$grouping][] = "contact_a.{$name} $op $value"; - } - } - else { - CRM_Utils_Type::validate($value, 'Integer'); - $this->_where[$grouping][] = "contact_a.{$name} $op $value"; - } $field = $this->_fields[$name] ?? NULL; + CRM_Utils_Type::validate($value, 'Integer'); + $this->_where[$grouping][] = "contact_a.{$name} $op $value"; $op = CRM_Utils_Array::value($op, CRM_Core_SelectValues::getSearchBuilderOperators(), $op); $title = $field ? $field['title'] : $name; $this->_qill[$grouping][] = "$title $op $value"; -- 2.25.1