<?php
-// $Id$
/*
+--------------------------------------------------------------------+
* @version $Id: MembershipContact.php 30171 2010-10-14 09:11:27Z mover $
*/
-/**
- * Files required for this package
- */
-
-require_once 'CRM/Utils/Rule.php';
-require_once 'CRM/Utils/Array.php';
-
/**
* Deletes an existing contact membership
*
return civicrm_api3_create_error('Input parameter should be numeric');
}
- CRM_Member_BAO_Membership::deleteRelatedMemberships($params['id']);
-
$membership = new CRM_Member_BAO_Membership();
- $result = $membership->deleteMembership($params['id']);
+ $result = $membership->del($params['id']);
return $result ? civicrm_api3_create_success() : civicrm_api3_create_error('Error while deleting Membership');
*/
function _civicrm_api3_membership_get_customv2behaviour(&$params, $contactID, $membershipTypeId, $activeOnly ){
// get the membership for the given contact ID
- require_once 'CRM/Member/BAO/Membership.php';
$membershipParams = array( 'contact_id' => $contactID );
if ( $membershipTypeId ) {
$membershipParams['membership_type_id'] = $membershipTypeId;