Remove a bunch of now-unused variables, will improve performance too as one involved...
[civicrm-core.git] / CRM / Contact / Import / Form / MapField.php
index a95847fdd41d1989a30b41141ea0a63b30d78aed..355bea62e8e3f717846df48c2f7f489a6dfd6dfe 100644 (file)
@@ -864,23 +864,6 @@ class CRM_Contact_Import_Form_MapField extends CRM_Import_Form_MapField {
       if ($mappingName[$i] != ts('- do not import -')) {
 
         if ($processor->getRelationshipKey($i)) {
-          $contactType = $processor->getContactType();
-          //CRM-5125
-          $contactSubType = NULL;
-          if ($this->get('contactSubType')) {
-            $contactSubType = $this->get('contactSubType');
-          }
-
-          $relations = CRM_Contact_BAO_Relationship::getContactRelationshipType(NULL, NULL, NULL, $contactType,
-            FALSE, 'label', TRUE, $contactSubType
-          );
-
-          foreach ($relations as $key => $var) {
-            if ($processor->getValidRelationshipKey($i)) {
-              $relation = $processor->getValidRelationshipKey($i);
-              break;
-            }
-          }
 
           $contactDetails = strtolower(str_replace(" ", "_", $mappingName[$i]));
           $websiteTypeId = $processor->getWebsiteTypeID($i);