Remove code handling for profile search listing
authorSeamus Lee <seamuslee001@gmail.com>
Sun, 29 Mar 2020 21:23:33 +0000 (08:23 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Thu, 16 Apr 2020 01:03:21 +0000 (11:03 +1000)
CRM/Contact/BAO/Query.php

index 5cf62c9d94780343230490e0994bc6a8339afa03..5dab66c8d56009cd0e600c57d0d9f29d701e97e0 100644 (file)
@@ -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";