From: Coleman Watts Date: Tue, 29 Jul 2014 18:59:52 +0000 (+0100) Subject: CRM-15056 - Workaround for civicrm_worldregion bug in search builder X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8b695e9120949b7a4817c41d3d910b0fb70d3546;p=civicrm-core.git CRM-15056 - Workaround for civicrm_worldregion bug in search builder --- diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 04864e91a6..f86c25ef94 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -1949,7 +1949,9 @@ class CRM_Contact_BAO_Query { $name, $op, $value, $grouping, CRM_Core_PseudoConstant::worldRegion(), $field, - ts('World Region') + ts('World Region'), + 'Positive', + TRUE ); } elseif ($name === 'birth_date') { @@ -5121,6 +5123,9 @@ AND displayRelType.is_active = 1 if ($tableName == 'civicrm_contact') { $wc = "contact_a.$fieldName"; } + else { + $wc = "$tableName.id"; + } } else { $wc = self::caseImportant($op) ? "LOWER({$field['where']})" : "{$field['where']}";