jenkins-bot has submitted this change and it was merged.

Change subject: CRM-17422 fix - Change in custom field search behaviour 
impacting on performance
......................................................................


CRM-17422 fix - Change in custom field search behaviour impacting on performance

Follow up fix (in 4.7 now) for LIKE '% being added where it's not needed.

https://issues.civicrm.org/jira/browse/CRM-17422

Bug: T99842
Change-Id: I8a5c10bea5020b36fd4ae29f40c7ec91e22cda7e
---
M CRM/Contact/Form/Search/Advanced.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Awight: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CRM/Contact/Form/Search/Advanced.php 
b/CRM/Contact/Form/Search/Advanced.php
index e5ee97d..297d274 100644
--- a/CRM/Contact/Form/Search/Advanced.php
+++ b/CRM/Contact/Form/Search/Advanced.php
@@ -387,8 +387,8 @@
           }
           $this->_formValues[$element] = array('IN' => $value);
         }
-        else {
-          $this->_formValues[$element] = array('LIKE' => "%$value%");
+        elseif (strstr($value, '%')) {
+          $this->_formValues[$element] = array('LIKE' => $value);
         }
       }
     }

-- 
To view, visit https://gerrit.wikimedia.org/r/248294
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a5c10bea5020b36fd4ae29f40c7ec91e22cda7e
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: civi-4.6.9
Gerrit-Owner: Eileen <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to