CRM-19198 Add form merge hook call to dedupe form
authoreileen <emcnaughton@wikimedia.org>
Tue, 9 Aug 2016 07:05:47 +0000 (19:05 +1200)
committereileen <emcnaughton@wikimedia.org>
Wed, 17 Aug 2016 01:51:40 +0000 (13:51 +1200)
CRM/Contact/Form/Merge.php

index 52e97b180648195264a59c835edccd6c89615c4c..b574c3115e7ef2ccdd80bc415927ba9b82f019b5 100644 (file)
@@ -317,8 +317,9 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
 
     $formValues['main_details'] = $this->_mainDetails;
     $formValues['other_details'] = $this->_otherDetails;
-
-    CRM_Dedupe_Merger::moveAllBelongings($this->_cid, $this->_oid, $formValues);
+    $migrationData = array('migration_info' => $formValues);
+    CRM_Utils_Hook::merge('form', $migrationData, $this->_cid, $this->_oid);
+    CRM_Dedupe_Merger::moveAllBelongings($this->_cid, $this->_oid, $migrationData['migration_info']);
 
     $name = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_cid, 'display_name');
     $message = '<ul><li>' . ts('%1 has been updated.', array(1 => $name)) . '</li><li>' . ts('Contact ID %1 has been deleted.', array(1 => $this->_oid)) . '</li></ul>';