From edc091f13b2b82e2e2b04153e4d8c571e6eaa833 Mon Sep 17 00:00:00 2001 From: Adam Roses Wight Date: Tue, 14 May 2013 21:43:01 -0700 Subject: [PATCH] Fix an error in 4d1d7ac - get short name from classname --- api/api.php | 2 +- xml/templates/listAll.tpl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/api/api.php b/api/api.php index bb34ce37ba..44488cae28 100644 --- a/api/api.php +++ b/api/api.php @@ -534,7 +534,7 @@ function _civicrm_api_get_entity_name_from_camel($entity) { */ function _civicrm_api_get_entity_name_from_dao($bao){ $daoName = str_replace("BAO", "DAO", get_class($bao)); - return _civicrm_api_get_entity_name_from_camel(CRM_Core_DAO_AllCoreTables::getFullName($daoName)); + return _civicrm_api_get_entity_name_from_camel(CRM_Core_DAO_AllCoreTables::getBriefName($daoName)); } /** diff --git a/xml/templates/listAll.tpl b/xml/templates/listAll.tpl index 24fcb911d3..4a670377ec 100644 --- a/xml/templates/listAll.tpl +++ b/xml/templates/listAll.tpl @@ -69,4 +69,8 @@ class CRM_Core_DAO_AllCoreTables {ldelim} return CRM_Utils_Array::value($daoName, self::$daoToClass); {rdelim} + static public function getBriefName($className) {ldelim} + return CRM_Utils_Array::value($className, array_flip(self::$daoToClass)); + {rdelim} + {rdelim} -- 2.25.1