Skip to content
Snippets Groups Projects
Commit 75f1b763 authored by Dave Greenberg's avatar Dave Greenberg
Browse files

Merge pull request #2206 from pratik-joshi/CRM-13907

CRM-13907
parents 1f4f97c1 0d77b56a
No related branches found
No related tags found
No related merge requests found
......@@ -1987,9 +1987,11 @@ class CRM_Contact_BAO_Query {
$op = 'LIKE';
}
$wc = self::caseImportant($op) ? "LOWER(contact_a.organization_name)" : "contact_a.organization_name";
$this->_where[$grouping][] = self::buildClause($wc, $op,
"'$value' AND contact_a.contact_type ='Individual'"
$ceWhereClause = self::buildClause($wc, $op,
$value
);
$ceWhereClause .= " AND contact_a.contact_type = 'Individual'";
$this->_where[$grouping][] = $ceWhereClause;
$this->_qill[$grouping][] = "$field[title] $op \"$value\"";
}
elseif ($name === 'email_greeting') {
......@@ -2029,7 +2031,7 @@ class CRM_Contact_BAO_Query {
}
$wc = 'civicrm_website.url';
$this->_where[$grouping][] = self::buildClause($wc, $op, "'$value'");
$this->_where[$grouping][] = $d = self::buildClause($wc, $op, $value);
$this->_qill[$grouping][] = "$field[title] $op \"$value\"";
}
elseif ($name === 'contact_is_deleted') {
......@@ -4876,7 +4878,6 @@ SELECT COUNT( civicrm_contribution.total_amount ) as cancel_count,
}
$value = CRM_Utils_Type::escape($value, $dataType);
// if we dont have a dataType we should assume
if ($dataType == 'String' || $dataType == 'Text') {
$value = "'" . strtolower($value) . "'";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment