CRM-15988 - Use lowercase entity name in field_id
authorColeman Watts <coleman@civicrm.org>
Thu, 12 Mar 2015 17:59:57 +0000 (13:59 -0400)
committerColeman Watts <coleman@civicrm.org>
Thu, 12 Mar 2015 17:59:57 +0000 (13:59 -0400)
api/v3/utils.php

index 802a93174b6e3cbb2c5fdc9deec1ca328e05e25e..aa680fb628776f795856d2f89b5b0072688f41f0 100644 (file)
@@ -2189,7 +2189,7 @@ function _civicrm_api3_api_resolve_alias($entity, $fieldName) {
   if (strpos($fieldName, 'custom_') === 0 && is_numeric($fieldName[7])) {
     return $fieldName;
   }
-  if ($fieldName == "{$entity}_id") {
+  if ($fieldName == _civicrm_api_get_entity_name_from_camel($entity) . '_id') {
     return 'id';
   }
   $result = civicrm_api($entity, 'getfields', array(