From: Johan Vervloet Date: Thu, 27 Aug 2015 19:52:56 +0000 (+0200) Subject: CRM-17101 - A bug fix. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4339a82a8216745062b2c9e58f3dc9d289d677a4;p=civicrm-core.git CRM-17101 - A bug fix. ---------------------------------------- * CRM-17101: civicrm_api3_basic_get does not work for SQL operators on custom fields. https://issues.civicrm.org/jira/browse/CRM-17101 --- diff --git a/api/v3/utils.php b/api/v3/utils.php index d2b8495f83..11ed468c96 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -641,7 +641,7 @@ function _civicrm_api3_get_using_utils_sql($dao_name, $params, $isFillUniqueFiel ); } else { - $query->where(CRM_Core_DAO::createSQLFilter('a.' . $column_name, $value, $type)); + $query->where(CRM_Core_DAO::createSQLFilter("{$table_name}.{$column_name}", $value, $type)); } } } diff --git a/tests/phpunit/api/v3/EventTest.php b/tests/phpunit/api/v3/EventTest.php index 1149b8e596..7560a5087e 100644 --- a/tests/phpunit/api/v3/EventTest.php +++ b/tests/phpunit/api/v3/EventTest.php @@ -451,7 +451,7 @@ class api_v3_EventTest extends CiviUnitTestCase { /** * Test searching on custom fields with less than or equal. - * + * * See CRM-17101. */ public function testEventGetCustomFieldLte() {