Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329709 )

Change subject: CRM-19811 fix contribution search to not use LOWER() on default 
fields (e.g. creditnote_id).
......................................................................

CRM-19811 fix contribution search to not use LOWER() on default fields (e.g. 
creditnote_id).

Add unit test to demonstrate case sensitivity still respected

Please refer to https://issues.civicrm.org/jira/browse/CRM-19811
and https://github.com/civicrm/civicrm-core/pull/9596

Bug: T153128
Change-Id: If9cb48e74b859fbd1c5e3bf639c5aba9b73f566f
---
M CRM/Contribute/BAO/Query.php
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/CRM/Contribute/BAO/Query.php b/CRM/Contribute/BAO/Query.php
index 60769ce..399373b 100644
--- a/CRM/Contribute/BAO/Query.php
+++ b/CRM/Contribute/BAO/Query.php
@@ -610,10 +610,9 @@
           $dataType = CRM_Utils_Type::typeToString($whereTable['type']);
         }
 
-        $wc = ($op != 'LIKE' && $dataType != 'Date') ? 
"LOWER($whereTable[where])" : "$whereTable[where]";
-        $query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause($wc, 
$op, $value, $dataType);
+        $query->_where[$grouping][] = 
CRM_Contact_BAO_Query::buildClause($whereTable['where'], $op, $value, 
$dataType);
         $query->_qill[$grouping][] = "$whereTable[title] $op $quoteValue";
-        list($tableName, $fieldName) = explode('.', $whereTable['where'], 2);
+        list($tableName) = explode('.', $whereTable['where'], 2);
         $query->_tables[$tableName] = $query->_whereTables[$tableName] = 1;
         if ($tableName == 'civicrm_contribution_product') {
           $query->_tables['civicrm_product'] = 
$query->_whereTables['civicrm_product'] = 1;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9cb48e74b859fbd1c5e3bf639c5aba9b73f566f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen <emcnaugh...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to