Skip to content

Commit

Permalink
Merge pull request #8691 from eileenmcnaughton/merge_like
Browse files Browse the repository at this point in the history
CRM-18694 alternative solution to easier post code searching.
  • Loading branch information
eileenmcnaughton authored Oct 11, 2016
2 parents e10c60e + 12af7ad commit 0ffe0fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CRM/Contact/Page/AJAX.php
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,9 @@ public static function getDedupes() {

foreach ($mappings as $key => $dbName) {
if (!empty($searchParams[$key])) {
$queryParams[$nextParamKey] = array('%' . $searchParams[$key] . '%', 'String');
// CRM-18694.
$wildcard = strstr($key, 'postcode') ? '' : '%';
$queryParams[$nextParamKey] = array($wildcard . $searchParams[$key] . '%', 'String');
$where[] = $dbName . " LIKE %{$nextParamKey} ";
$nextParamKey++;
}
Expand Down

0 comments on commit 0ffe0fe

Please sign in to comment.