From a861c4f580cff676ab269d69b26cfa1b711a4898 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 15 Sep 2016 21:09:27 +1000 Subject: [PATCH] api camel case fixes --- api/api.php | 3 +++ api/v3/utils.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/api/api.php b/api/api.php index e20c451d8f..32b0c2297f 100644 --- a/api/api.php +++ b/api/api.php @@ -180,6 +180,9 @@ function _civicrm_api_get_entity_name_from_camel($entity) { if (!$entity || $entity === strtolower($entity)) { return $entity; } + elseif ($entity == 'PCP') { + return 'pcp'; + } else { $entity = ltrim(strtolower(str_replace('U_F', 'uf', diff --git a/api/v3/utils.php b/api/v3/utils.php index b11f4f2a55..e039a2acf2 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -354,7 +354,7 @@ function _civicrm_api3_get_DAO($name) { return 'CRM_SMS_DAO_Provider'; } // FIXME: DAO names should follow CamelCase convention - if ($name == 'Im' || $name == 'Acl') { + if ($name == 'Im' || $name == 'Acl' || $name == 'Pcp') { $name = strtoupper($name); } $dao = CRM_Core_DAO_AllCoreTables::getFullName($name); -- 2.25.1