Skip to content

Commit

Permalink
Improve readability by using "{$var}" style.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfb committed Nov 21, 2019
1 parent b813e2c commit c9e6bc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRM/Contact/Page/AJAX.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,15 @@ public static function getContactEmail() {
$name = CRM_Utils_Type::escape($name, 'String');
$wildCard = Civi::settings()->get('includeWildCardInName') ? '%' : '';
foreach (['cc.sort_name', 'cc.first_name', 'ce.email'] as $column) {
$queryStrings[] = " $column LIKE '$wildCard$name%' ";
$queryStrings[] = "{$column} LIKE '{$wildCard}{$name}%'";
}
$result = [];
$rowCount = Civi::settings()->get('search_autocomplete_count');

// add acl clause here
list($aclFrom, $aclWhere) = CRM_Contact_BAO_Contact_Permission::cacheClause('cc');
if ($aclWhere) {
$aclWhere = " AND $aclWhere";
$aclWhere = "AND {$aclWhere}";
}
foreach ($queryStrings as &$queryString) {
$queryString = "(
Expand Down

0 comments on commit c9e6bc2

Please sign in to comment.