projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a04a656
)
CRM-13807 - Verify BAO exists in api getBAO
author
Coleman Watts
<coleman@civicrm.org>
Thu, 21 Nov 2013 02:26:23 +0000
(18:26 -0800)
committer
Coleman Watts
<coleman@civicrm.org>
Thu, 21 Nov 2013 02:26:23 +0000
(18:26 -0800)
api/v3/utils.php
patch
|
blob
|
blame
|
history
diff --git
a/api/v3/utils.php
b/api/v3/utils.php
index 36e84b908049ef1351e0822e90be48a1188d283b..4c7d369978a39270b0d6e900543b73c1b469e1b5 100644
(file)
--- a/
api/v3/utils.php
+++ b/
api/v3/utils.php
@@
-307,8
+307,9
@@
function _civicrm_api3_get_DAO($name) {
*/
function _civicrm_api3_get_BAO($name) {
$dao = _civicrm_api3_get_DAO($name);
- $dao = str_replace("DAO", "BAO", $dao);
- return $dao;
+ $bao = str_replace("DAO", "BAO", $dao);
+ $file = str_replace('_', '/', $dao) . '.php';
+ return file_exists($file) ? $bao : $dao;
}
/**