X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fapi.php;h=8882e8df90f85a3611cf668d8a581ca1978431c3;hb=df7cbeeb4ea8b2539247e4806de12aaa31af670d;hp=c09d220249775dfe0cc439890f1aa65e28676fb1;hpb=3838662faff56daff7b4fbbd25c60a4b7242a484;p=civicrm-core.git diff --git a/api/api.php b/api/api.php index c09d220249..8882e8df90 100644 --- a/api/api.php +++ b/api/api.php @@ -100,20 +100,11 @@ function civicrm_error($result) { /** * @param $entity - * @param null $version * * @return string */ -function _civicrm_api_get_camel_name($entity, $version = NULL) { - $fragments = explode('_', $entity); - foreach ($fragments as & $fragment) { - $fragment = ucfirst($fragment); - } - // Special case: UFGroup, UFJoin, UFMatch, UFField - if ($fragments[0] === 'Uf') { - $fragments[0] = 'UF'; - } - return implode('', $fragments); +function _civicrm_api_get_camel_name($entity) { + return CRM_Utils_String::convertStringToCamel($entity); } /**