CRM-17490 fix interface error on activity import
authoreileenmcnaugton <eileen@fuzion.co.nz>
Mon, 2 Nov 2015 18:25:33 +0000 (07:25 +1300)
committereileenmcnaugton <eileen@fuzion.co.nz>
Mon, 2 Nov 2015 18:25:33 +0000 (07:25 +1300)
CRM/Activity/Import/Parser/Activity.php

index 7bec9bf46549fa74c046ea2cf41491f1c3de4dd6..afeec3f4635b6e2c3101b8fa012552632881ff38 100644 (file)
@@ -55,14 +55,19 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Activity_Import_Parser {
    * Class constructor.
    *
    * @param array $mapperKeys
-   * @param null $mapperLocType
-   * @param null $mapperPhoneType
+   * @param int $mapperLocType
+   * @param int $mapperPhoneType
    */
   public function __construct(&$mapperKeys, $mapperLocType = NULL, $mapperPhoneType = NULL) {
     parent::__construct();
     $this->_mapperKeys = &$mapperKeys;
   }
 
+  /**
+   * Function of undocumented functionality required by the interface.
+   */
+  protected function fini() {}
+
   /**
    * The initializer code, called before the processing.
    */
@@ -161,9 +166,8 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Activity_Import_Parser {
    */
   public function summary(&$values) {
     $erroneousField = NULL;
-    $response = $this->setActiveFieldValues($values, $erroneousField);
+    $this->setActiveFieldValues($values, $erroneousField);
     $index = -1;
-    $errorRequired = FALSE;
 
     if ($this->_activityTypeIndex > -1 && $this->_activityLabelIndex > -1) {
       array_unshift($values, ts('Please select either Activity Type ID OR Activity Type Label.'));
@@ -262,7 +266,7 @@ class CRM_Activity_Import_Parser_Activity extends CRM_Activity_Import_Parser {
     if (!isset($params['source_contact_id'])) {
       $params['source_contact_id'] = $session->get('userID');
     }
-    $formatted = array();
+
     $customFields = CRM_Core_BAO_CustomField::getFields(CRM_Utils_Array::value('contact_type', $params));
 
     foreach ($params as $key => $val) {