From: CiviCRM
Date: Thu, 17 Jul 2014 14:52:10 +0000 (+0530)
Subject: Removal of Notice, warning and Communication label Fix
X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0e35787228159c3b757efe30485dbb6328cc98fd;p=civicrm-core.git
Removal of Notice, warning and Communication label Fix
---
diff --git a/CRM/Contact/Form/Merge.php b/CRM/Contact/Form/Merge.php
index c0aa640e38..7339871684 100644
--- a/CRM/Contact/Form/Merge.php
+++ b/CRM/Contact/Form/Merge.php
@@ -195,12 +195,6 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
}
$this->assign('contact_type', $main['contact_type']);
- if (!empty($main['contact_sub_type'])) {
- $this->assign('main_contact_subtype', $main['contact_sub_type_display']);
- }
- if (!empty($other['contact_sub_type'])) {
- $this->assign('other_contact_subtype', $other['contact_sub_type_display']);
- }
$this->assign('main_name', $main['display_name']);
$this->assign('other_name', $other['display_name']);
$this->assign('main_cid', $main['contact_id']);
diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php
index 2e975a3217..7057ad3555 100644
--- a/CRM/Dedupe/Merger.php
+++ b/CRM/Dedupe/Merger.php
@@ -827,6 +827,7 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m
$specialValues[$moniker] = array(
'preferred_communication_method' => $value,
'contact_sub_type' => $value,
+ 'communication_style_id' => $value,
);
if (!empty($contact['preferred_communication_method'])){
@@ -855,6 +856,10 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m
}
$contact['contact_sub_type_display'] = $specialValues[$moniker]['contact_sub_type_display'] = implode(', ', $subtypes);
}
+
+ if (!empty($contact['communication_style'])) {
+ $specialValues[$moniker]['communication_style_id_display'] = $contact['communication_style'];
+ }
}
static $optionValueFields = array();
@@ -1361,6 +1366,9 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m
foreach ($submitted as $key => $value) {
if (substr($key, 0, 7) == 'custom_') {
$fid = (int) substr($key, 7);
+ if (empty($cFields[$fid])) {
+ continue;
+ }
$htmlType = $cFields[$fid]['attributes']['html_type'];
switch ($htmlType) {
case 'File':
diff --git a/templates/CRM/Contact/Form/Merge.tpl b/templates/CRM/Contact/Form/Merge.tpl
index 9fcec8ba0a..f74e218b4a 100644
--- a/templates/CRM/Contact/Form/Merge.tpl
+++ b/templates/CRM/Contact/Form/Merge.tpl
@@ -135,9 +135,6 @@
The user record associated with the duplicate contact will not be deleted, but will be un-linked from the associated contact record (which will be deleted).
You will need to manually delete that user (click on the link to open Drupal User account in new screen). You may need to give thought to how you handle any content or contents associated with that user.{/ts}
{/if}
- {if $other_contact_subtype}
- The duplicate contact (the one that will be deleted) is a {$other_contact_subtype}. Any data related to this will be lost forever (there is no undo) if you complete the merge.
- {/if}