fix version and year
[civicrm-core.git] / CRM / Contact / Form / Merge.php
index 4e4da226a83cda99a96f9966b93676c720c74e74..ba623951996e0129efc83067e91b59fa949ee8c4 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2015
+ * @copyright CiviCRM LLC (c) 2004-2016
  */
 
 /**
@@ -44,9 +44,6 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
 
   var $_contactType = NULL;
 
-  // variable to keep all location block ids.
-  protected $_locBlockIds = array();
-
   // FIXME: QuickForm can't create advcheckboxes with value set to 0 or '0' :(
   // see HTML_QuickForm_advcheckbox::setValues() - but patching that doesn't
   // help, as QF doesn't put the 0-value elements in exportValues() anyway...
@@ -214,11 +211,6 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
     $this->assign('mainLocBlock', json_encode($rowsElementsAndInfo['main_loc_block']));
     $this->assign('rows', $rowsElementsAndInfo['rows']);
 
-    $this->_locBlockIds = array(
-      'main' => $rowsElementsAndInfo['main_details']['loc_block_ids'],
-      'other' => $rowsElementsAndInfo['other_details']['loc_block_ids'],
-    );
-
     // add elements
     foreach ($rowsElementsAndInfo['elements'] as $element) {
       $this->addElement($element[0],
@@ -329,20 +321,6 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form {
     $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>';
     CRM_Core_Session::setStatus($message, ts('Contacts Merged'), 'success');
 
-    //create activity for merge
-    //To do: this should be refactored into BAO layer at some point.
-    $messageActivity = ts('Contact ID %1 has been merged and deleted.', array(1 => $this->_oid));
-    $activityParams = array(
-      'subject' => $messageActivity,
-      'source_contact_id' => $session->get('userID'),
-      'target_contact_id' => $this->_cid,
-      'activity_type_id' => CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'Contact Merged'),
-      'status_id' => 'Completed',
-      'priority_id' => 'Normal',
-      'activity_date_time' => date('YmdHis'),
-    );
-    civicrm_api3('activity', 'create', $activityParams);
-
     $url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$this->_cid}");
     if (!empty($formValues['_qf_Merge_submit'])) {
       $listParamsURL = "reset=1&action=update&rgid={$this->_rgid}";