Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-02-02-18-36-16
authorkurund <kurund@civicrm.org>
Mon, 2 Feb 2015 13:10:24 +0000 (18:40 +0530)
committerkurund <kurund@civicrm.org>
Mon, 2 Feb 2015 13:10:24 +0000 (18:40 +0530)
Conflicts:
CRM/Dedupe/Merger.php

1  2 
CRM/Dedupe/Merger.php

index 45f520e7996e12b417d9ed42701e73586b7db578,3f926f75899895248a1d1743322b0a9132e6f792..9c938ebaf6f6d47e8c2b45f200e0409c43b0a9a9
@@@ -746,11 -743,10 +746,9 @@@ INNER JOIN  civicrm_membership membersh
          // Rule: resolve address conflict if any -
          if ($fieldName == 'address') {
            $mainNewLocTypeId = $migrationInfo['location'][$fieldName][$fieldCount]['locTypeId'];
-           if (!empty($migrationInfo['main_loc_address']) &&
-             array_key_exists("main_{$mainNewLocTypeId}", $migrationInfo['main_loc_address'])
-           ) {
+           if (!empty($migrationInfo['main_loc_block']) &&
+               array_key_exists("main_address{$mainNewLocTypeId}", $migrationInfo['main_loc_block'])) {
              // main loc already has some address for the loc-type. Its a overwrite situation.
--
              // look for next available loc-type
              $newTypeId = NULL;
              foreach ($allLocationTypes as $typeId => $typeLabel) {