CRM-13252 exit nested api if getfields/getoptions action
authorBrian Shaughnessy <brian@lcdservices.biz>
Thu, 9 Jan 2014 17:08:33 +0000 (12:08 -0500)
committerBrian Shaughnessy <brian@lcdservices.biz>
Thu, 9 Jan 2014 17:08:33 +0000 (12:08 -0500)
api/api.php

index b976ebf51dbcc98afaf2c3662e5b10f0679da02d..b91940a033195091484eaec6fab308c75817cd6e 100644 (file)
@@ -444,6 +444,12 @@ function _civicrm_api_get_camel_name($entity, $version = NULL) {
  */
 function _civicrm_api_call_nested_api(&$params, &$result, $action, $entity, $version) {
   $entity = _civicrm_api_get_entity_name_from_camel($entity);
+
+  //we don't need to worry about nested api in the getfields/getoptions actions, so just return immediately
+  if (in_array(strtolower($action), array('getfields', 'getoptions'))) {
+    return;
+  }
+
   if(strtolower($action) == 'getsingle'){
     // I don't understand the protocol here, but we don't want
     // $result to be a recursive array