Skip to content

Commit

Permalink
Reformat hard code list as per suggestion from Tim
Browse files Browse the repository at this point in the history
  • Loading branch information
seamuslee001 committed Apr 11, 2017
1 parent 449fbe1 commit 5bc7d8e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Civi/API/Subscriber/ChainSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ protected function callNestedApi($apiKernel, &$params, &$result, $action, $entit

// Hard coded list of entitys that have fields starting api_ and shouldn't be automatically
// deemed to be chained API calls
if ((($subEntity == 'type' || $subEntity == 'url') && $entity == 'SmsProvider') ||
($entity == 'Job' && ($subEntity == 'prefix' || $subEntity == 'entity' || $subEntity == 'action')) ||
($entity == 'Contact' && $subEntity == 'key')) {
$skipList = array(
'SmsProvider' => array('type', 'url', 'params'),
'Job' => array('prefix', 'entity', 'action'),
'Contact' => array('key'),
);
if (isset($skipList[$entity]) && in_array($subEntity, $skipList[$entity])) {
continue;
}

Expand Down

0 comments on commit 5bc7d8e

Please sign in to comment.