*/
public function includeContactSubTypes($value, $grouping, $op = 'LIKE') {
+ if (is_array($value) && in_array(key($value), CRM_Core_DAO::acceptedSQLOperators(), TRUE)) {
+ $op = key($value);
+ $value = $value[$op];
+ }
+
$clause = array();
$alias = "contact_a.contact_sub_type";
$qillOperators = CRM_Core_SelectValues::getSearchBuilderOperators();
elseif (is_array($value)) {
foreach ($value as $k => $v) {
if (!empty($k)) {
- $clause[$k] = "($alias $op '%" . CRM_Core_DAO::VALUE_SEPARATOR . CRM_Utils_Type::escape($k, 'String') . CRM_Core_DAO::VALUE_SEPARATOR . "%')";
+ $clause[$k] = "($alias $op '%" . CRM_Core_DAO::VALUE_SEPARATOR . CRM_Utils_Type::escape($v, 'String') . CRM_Core_DAO::VALUE_SEPARATOR . "%')";
}
}
}