https://issues.civicrm.org/jira/browse/CRM-17422
}
$this->_formValues[$element] = array('IN' => $value);
}
- else {
- $this->_formValues[$element] = array('LIKE' => "%$value%");
+ elseif ((substr($formValues[$key], 0, 1) == '%') || (substr($formValues[$key], -1, 1) == '%')) {
+ $this->_formValues[$element] = array('LIKE' => $value);
}
}
}
elseif (($htmlType == 'TextArea' ||
($htmlType == 'Text' && $dataType == 'String')
) &&
- !((substr($formValues[$key], 0, 1) == '%') ||
+ ((substr($formValues[$key], 0, 1) == '%') ||
(substr($formValues[$key], -1, 1) == '%')
)
) {
- $formValues[$key] = array('LIKE' => '%' . $formValues[$key] . '%');
+ $formValues[$key] = array('LIKE' => $formValues[$key]);
}
}
}