From aba9f5c5b2692f5b2731c1d67fe947b03a168b0a Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Wed, 23 Feb 2022 09:28:10 -0500 Subject: [PATCH] remove unused v2 function --- api/v3/Membership.php | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/api/v3/Membership.php b/api/v3/Membership.php index 689f880ec4..7804ee3818 100644 --- a/api/v3/Membership.php +++ b/api/v3/Membership.php @@ -238,34 +238,6 @@ function civicrm_api3_membership_get($params) { return civicrm_api3_create_success($members, $params, 'Membership', 'get'); } -/** - * Perform api v2 custom behaviour. - * - * When we copied apiv3 from api v2 we brought across some custom behaviours - in the case of - * membership a complicated return array is constructed. The original - * behaviour made contact_id a required field. We still need to keep this for v3 when contact_id - * is passed in as part of the reasonable expectation developers have that we will keep the api - * as stable as possible - * - * @param array $params - * Parameters passed into get function. - * @param int $membershipTypeId - * @param bool $activeOnly - * - * @return array - * result for calling function - */ -function _civicrm_api3_membership_get_customv2behaviour(&$params, $membershipTypeId, $activeOnly) { - // get the membership for the given contact ID - $membershipParams = ['contact_id' => $params['contact_id']]; - if ($membershipTypeId) { - $membershipParams['membership_type_id'] = $membershipTypeId; - } - $membershipValues = []; - CRM_Member_BAO_Membership::getValues($membershipParams, $membershipValues, $activeOnly); - return $membershipValues; -} - /** * Non-standard behaviour inherited from v2. * -- 2.25.1