X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FGroupContact.php;h=53f055e82b856ee0128c2fcc367c0c8c51a7cc14;hb=4efe7d63f496200b7dc3da3c80883318cda82be1;hp=52a45fbefc8a8e468aaa75299169c6023d4864b1;hpb=e956581b894cf392033bd97bd0ac22281c5c4f36;p=civicrm-core.git diff --git a/api/v3/GroupContact.php b/api/v3/GroupContact.php index 52a45fbefc..53f055e82b 100644 --- a/api/v3/GroupContact.php +++ b/api/v3/GroupContact.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.7 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2016 | + | Copyright CiviCRM LLC (c) 2004-2017 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -140,25 +140,25 @@ function civicrm_api3_group_contact_create($params) { * Delete group contact record. * * @param array $params - * * @return array - * + * @throws API_Exception + * @throws CiviCRM_API3_Exception * @deprecated */ function civicrm_api3_group_contact_delete($params) { $checkParams = $params; if (!empty($checkParams['status']) && in_array($checkParams['status'], array('Removed', 'Deleted'))) { - $checkParams['status'] = 'Added'; + $checkParams['status'] = array('IN' => array('Added', 'Pending')); } elseif (!empty($checkParams['status']) && $checkParams['status'] == 'Added') { - $checkParams['status'] = 'Removed'; + $checkParams['status'] = array('IN' => array('Pending', 'Removed')); } elseif (!empty($checkParams['status'])) { unset($checkParams['status']); } $groupContact = civicrm_api3('GroupContact', 'get', $checkParams); if ($groupContact['count'] == 0 && !empty($params['skip_undelete'])) { - $checkParams['status'] = 'removed'; + $checkParams['status'] = array('IN' => array('Removed', 'Pending')); } $groupContact2 = civicrm_api3('GroupContact', 'get', $checkParams); if ($groupContact['count'] == 0 && $groupContact2['count'] == 0) {