X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FMembershipType.php;h=f588e79c10ce57d3f950d7b0178b96f77e9c3245;hb=37cc330bb866c2efde4916963e7ce937fd7190c8;hp=386626c548f784ef2c3749b94d699e54236cf765;hpb=9a642ff40d4286d1823c05c2cdc0f6615c4cbf59;p=civicrm-core.git diff --git a/api/v3/MembershipType.php b/api/v3/MembershipType.php index 386626c548..f588e79c10 100644 --- a/api/v3/MembershipType.php +++ b/api/v3/MembershipType.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2019 | + | Copyright CiviCRM LLC (c) 2004-2020 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -87,6 +87,7 @@ function civicrm_api3_membership_type_get($params) { // Workaround for fields using nonstandard serialization foreach (['relationship_type_id', 'relationship_direction'] as $field) { if (isset($item[$field]) && !is_array($item[$field])) { + // @todo - this should be handled by the serialization now... $item[$field] = (array) $item[$field]; } } @@ -95,6 +96,18 @@ function civicrm_api3_membership_type_get($params) { return $results; } +/** + * Adjust Metadata for Get action. + * + * The metadata is used for setting defaults, documentation & validation. + * + * @param array $params + * Array of parameters determined by getfields. + */ +function _civicrm_api3_membership_type_get_spec(&$params) { + $params['domain_id']['api.default'] = CRM_Core_Config::domainID(); +} + /** * Adjust input for getlist action. *