From 8b695e9120949b7a4817c41d3d910b0fb70d3546 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Tue, 29 Jul 2014 19:59:52 +0100 Subject: [PATCH] CRM-15056 - Workaround for civicrm_worldregion bug in search builder --- CRM/Contact/BAO/Query.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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']}"; -- 2.25.1