Eileen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/248294

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/94/248294/1

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: newchange
Gerrit-Change-Id: I8a5c10bea5020b36fd4ae29f40c7ec91e22cda7e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: civi-4.6.9
Gerrit-Owner: Eileen <[email protected]>

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

Reply via email to