Skip to content

Commit

Permalink
api camel case fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslee001 committed Sep 15, 2016
1 parent 992d5ea commit 66a0c88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions api/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ function _civicrm_api_get_entity_name_from_camel($entity) {
if (!$entity || $entity === strtolower($entity)) {
return $entity;
}
else if ($entity == 'PCP') {
return 'pcp';
}
else {
$entity = ltrim(strtolower(str_replace('U_F',
'uf',
Expand Down
2 changes: 1 addition & 1 deletion api/v3/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 66a0c88

Please sign in to comment.