projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d92f8d
)
CRM-15442 - Change spaces to wildcards in contact.getlist api
author
Coleman Watts
<coleman@civicrm.org>
Wed, 15 Oct 2014 02:33:28 +0000
(22:33 -0400)
committer
Coleman Watts
<coleman@civicrm.org>
Wed, 15 Oct 2014 02:33:28 +0000
(22:33 -0400)
api/v3/Contact.php
patch
|
blob
|
blame
|
history
diff --git
a/api/v3/Contact.php
b/api/v3/Contact.php
index de3602f10af6beb8d690953cd0497fb2d3b758a4..d0c7cfabab295ea58aa82112302fef4a80dcdc85 100644
(file)
--- a/
api/v3/Contact.php
+++ b/
api/v3/Contact.php
@@
-982,7
+982,8
@@
function _civicrm_api3_contact_getlist_params(&$request) {
$request['params']['options']['sort'] = 'sort_name';
// Contact api doesn't support array(LIKE => 'foo') syntax
if (!empty($request['input'])) {
- $request['params'][$request['search_field']] = $request['input'];
+ // CRM-15442 - change spaces to % wildcards when searching by name
+ $request['params'][$request['search_field']] = strpos($request['search_field'], 'name') ? str_replace(' ', '%', $request['input']) : $request['input'];
}
}