Merge - Remove leftover references to 'location' array
authorJKingsnorth <john@johnkingsnorth.co.uk>
Fri, 22 Apr 2016 10:32:13 +0000 (11:32 +0100)
committerJKingsnorth <john@johnkingsnorth.co.uk>
Fri, 22 Apr 2016 10:32:13 +0000 (11:32 +0100)
CRM/Dedupe/Merger.php
templates/CRM/Contact/Form/Merge.tpl

index 158953b1488a34dc5348a2edbdc54b7436fc22e4..0226c2d9fa986e3a48eb88eff7e49c2f4cd63bed 100644 (file)
@@ -1205,7 +1205,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
           $migrationInfo["move_location_{$blockName}_{$count}"] = 1;
 
           // Add a hidden field to store the ID of the target main contact block
-          $elements[] = array('hidden', "location[$blockName][$count][mainContactBlockId]", $mainContactBlockId);
+          $elements[] = array('hidden', "location_blocks[$blockName][$count][mainContactBlockId]", $mainContactBlockId);
 
           // Setup variables
           $thisTypeId = FALSE;
@@ -1236,7 +1236,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
             // Add the element
             $elements[] = array(
               'select',
-              "location[$blockName][$count][locTypeId]",
+              "location_blocks[$blockName][$count][locTypeId]",
               NULL,
               $defaultLocId + $tmpIdList,
               $js,
@@ -1247,7 +1247,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
             // @todo Check this logic out
             $migrationInfo['location_blocks'][$blockName][$count]['locTypeId'] = $thisLocId;
             if ($blockName != 'address') {
-              $elements[] = array('advcheckbox', "location[{$blockName}][$count][operation]", NULL, ts('add new'));
+              $elements[] = array('advcheckbox', "location_blocks[{$blockName}][$count][operation]", NULL, ts('add new'));
               // always use add operation
               $migrationInfo['location_blocks'][$blockName][$count]['operation'] = 1;
             }
@@ -1279,7 +1279,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
             // Add the element
             $elements[] = array(
               'select',
-              "location[$blockName][$count][typeTypeId]",
+              "location_blocks[$blockName][$count][typeTypeId]",
               NULL,
               $defaultTypeId + $tmpIdList,
               $js,
@@ -1474,7 +1474,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
         // @todo Tidy this up
         $operation = 0;
         if ($fieldName != 'website') {
-          $operation = CRM_Utils_Array::value('operation', $migrationInfo['location'][$fieldName][$fieldCount]);
+          $operation = CRM_Utils_Array::value('operation', $migrationInfo['location_blocks'][$fieldName][$fieldCount]);
         }
         // default operation is overwrite.
         if (!$operation) {
@@ -1528,16 +1528,16 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
 
           // Add/update location and type information from the form, if applicable
           if ($locationBlocks[$name]['hasLocation']) {
-            $locTypeId = CRM_Utils_Array::value('locTypeId', $migrationInfo['location'][$name][$blkCount]);
+            $locTypeId = CRM_Utils_Array::value('locTypeId', $migrationInfo['location_blocks'][$name][$blkCount]);
             $otherBlockDAO->location_type_id = $locTypeId;
           }
           if ($locationBlocks[$name]['hasType']) {
-            $typeTypeId = CRM_Utils_Array::value('typeTypeId', $migrationInfo['location'][$name][$blkCount]);
+            $typeTypeId = CRM_Utils_Array::value('typeTypeId', $migrationInfo['location_blocks'][$name][$blkCount]);
             $otherBlockDAO->{$locationBlocks[$name]['hasType']} = $typeTypeId;
           }
 
           // Get main block ID
-          $mainBlockId = CRM_Utils_Array::value('mainContactBlockId', $migrationInfo['location'][$name][$blkCount], 0);
+          $mainBlockId = CRM_Utils_Array::value('mainContactBlockId', $migrationInfo['location_blocks'][$name][$blkCount], 0);
 
           // if main contact already has primary & billing, set the flags to 0.
           if ($primaryDAOId) {
index 1ed340e3d164b3b3367805fb3c43ddc5f8258585..0699aa4652f0ae81f1d8a9fc372bf679394602e7 100644 (file)
             <td>
               {* Display location for fields with locations *}
               {if $blockName eq 'email' || $blockName eq 'phone' || $blockName eq 'address' || $blockName eq 'im' }
-                {$form.location.$blockName.$blockId.locTypeId.html}&nbsp;
+                {$form.location_blocks.$blockName.$blockId.locTypeId.html}&nbsp;
               {/if}
 
               {* Display other_type_id for websites, ims and phones *}
               {if $blockName eq 'website' || $blockName eq 'im' || $blockName eq 'phone' }
-                {$form.location.$blockName.$blockId.typeTypeId.html}&nbsp;
+                {$form.location_blocks.$blockName.$blockId.typeTypeId.html}&nbsp;
               {/if}
 
               {* Display the overwrite/add/add new label *}
                 {if $row.main}
                   <span class="action_label">({ts}overwrite{/ts})</span>&nbsp;
                    {if $blockName eq 'email' || $blockName eq 'phone' }
-                     {$form.location.$blockName.$blockId.operation.html}&nbsp;
+                     {$form.location_blocks.$blockName.$blockId.operation.html}&nbsp;
                    {/if}
                    <br />
                 {else}