From a90acbdbf6f14dd1403b6cfbc6f3e83945a476d6 Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 15 May 2013 23:54:43 +1200 Subject: [PATCH] CRM-12628 hack to deal with poorly named BAO class --- api/v3/utils.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api/v3/utils.php b/api/v3/utils.php index ae063d4d2b..e014a13d6a 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -299,7 +299,17 @@ function _civicrm_api3_get_DAO($name) { if(strtolower($name) == 'im'){ return 'CRM_Core_BAO_IM'; } + if(strtolower($name) == 'group'){ + // CRM-12628 + //@todo we have to do this because the naming convention of MailingGroup is + // wrong & it clobbers group + return 'CRM_Contact_BAO_Group'; + } + if(strtolower($name) == 'mailing_group' || $name == 'MailingGroup'){ + // CRM-12628 + return 'CRM_Mailing_BAO_Group'; + } return CRM_Core_DAO_AllCoreTables::getFullName(_civicrm_api_get_camel_name($name, 3)); } -- 2.25.1