if (empty($result['values'][$cid]['contact_type'])) {
return FALSE;
}
+
+ // CRM-18480: Cancel the process if the contact is already deleted
+ if (isset($result['values'][$cid]['contact_is_deleted']) && !empty($result['values'][$cid]['contact_is_deleted'])) {
+ CRM_Core_Error::fatal(ts('Cannot merge because the \'%1\' contact (ID %2) has been deleted.', array(1 => $moniker, 2 => $cid)));
+ }
+
$$moniker = $result['values'][$cid];
}
$contactFields = CRM_Contact_DAO_Contact::fields();
$invalidFields = array(
'api_key',
- 'contact_is_deleted',
'created_date',
'display_name',
'hash',