X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2Futils.php;h=5a8c0e54b75c6679425ed21816b1da15db8fc660;hb=46d87393f7bd29c1a5416e62207293f58115412c;hp=1e5d3836401b77ab01d0542f76d143cd3dda0e5b;hpb=850d8c7cf555cdb11176418b2d1ecd035eddcb14;p=civicrm-core.git diff --git a/api/v3/utils.php b/api/v3/utils.php index 1e5d383640..5a8c0e54b7 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -173,6 +173,10 @@ function civicrm_api3_create_success($values = 1, $params = [], $entity = NULL, // 4.3 legacy handling. $values[$key]['contribution_type_id'] = $item['financial_type_id']; } + if (!empty($item['contribution_cancel_date'])) { + // 5.16 legacy handling. + $values[$key]['cancel_date'] = $item['contribution_cancel_date']; + } if (!empty($item['next_sched_contribution_date'])) { // 4.4 legacy handling $values[$key]['next_sched_contribution'] = $item['next_sched_contribution_date']; @@ -381,6 +385,11 @@ function _civicrm_api3_get_BAO($name) { // has enhanced access to other entities. $name = 'Contribution'; } + if ($name === 'Dedupe') { + // Dedupe is a pseudoentity for PrevNextCache - but accessing dedupe related info + // not the other cache info like search results (which could in fact be in Redis or another cache engine) + $name = 'PrevNextCache'; + } $dao = _civicrm_api3_get_DAO($name); if (!$dao) { return NULL; @@ -774,7 +783,7 @@ function _civicrm_api3_apply_filters_to_dao($filterField, $filterValue, &$dao) { * @return array * options extracted from params */ -function _civicrm_api3_get_options_from_params(&$params, $queryObject = FALSE, $entity = '', $action = '') { +function _civicrm_api3_get_options_from_params($params, $queryObject = FALSE, $entity = '', $action = '') { $lowercase_entity = _civicrm_api_get_entity_name_from_camel($entity); $is_count = FALSE; $sort = CRM_Utils_Array::value('sort', $params, 0); @@ -2153,7 +2162,8 @@ function _civicrm_api3_resolve_country_id($params) { * @param string $contactIdExpr * E.g. "user_contact_id" or "@user:username". * - * @return int|NULL|'unknown-user' + * @return int|null|'unknown-user' + * @throws \CRM_Core_Exception */ function _civicrm_api3_resolve_contactID($contactIdExpr) { // If value = 'user_contact_id' replace value with logged in user id.