CRM-14817 - Core CiviCRM - Relationship field mapping option disappear
authorJimmy Huang <jimmy@netivism.com.tw>
Fri, 13 Jun 2014 15:38:50 +0000 (23:38 +0800)
committerJimmy Huang <jimmy@netivism.com.tw>
Fri, 13 Jun 2014 15:38:50 +0000 (23:38 +0800)
----------------------------------------
* CRM-14817: Relationship field mapping option disappear after select more field
  https://issues.civicrm.org/jira/browse/CRM-14817

CRM/Core/BAO/Mapping.php

index 606dd28dec4835f1998fcc238554bf128a0f80ad..828c04664840d7edb73ab3d49e6e4e7433225f48 100644 (file)
@@ -841,7 +841,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
         }
         //Fix for Search Builder
         if ($mappingType == 'Export') {
-          if (!isset($mappingId)) {
+          if (!isset($mappingId) || $i >= count(reset($mappingName))) {
             if (isset($formValues['mapper']) &&
               isset($formValues['mapper'][$x][$i][1]) &&
               array_key_exists($formValues['mapper'][$x][$i][1], $relationshipTypes)