if (!$tables) {
$tables = array('civicrm_pledge', 'civicrm_membership', 'civicrm_participant');
}
-
return $tables;
}
$resultStats['skipped'][] = array('main_id' => $mainId, 'other_id' => $otherId);
}
- // store any conflicts
+ // store any conflicts
if (!empty($conflicts)) {
foreach ($conflicts as $key => $dnc) {
$conflicts[$key] = "{$migrationInfo['rows'][$key]['title']}: '{$migrationInfo['rows'][$key]['main']}' vs. '{$migrationInfo['rows'][$key]['other']}'";
* @return bool
*/
public static function skipMerge($mainId, $otherId, &$migrationInfo, $mode = 'safe', &$conflicts = array()) {
- //$conflicts = array();
+
$migrationData = array(
'old_migration_info' => $migrationInfo,
'mode' => $mode,
foreach ($migrationInfo as $key => $val) {
if ($val === "null") {
- // Rule: no overwriting with empty values in any mode
+ // Rule: Never overwrite with an empty value (in any mode)
unset($migrationInfo[$key]);
continue;
}
substr($key, 0, 12) == 'move_custom_'
) and $val != NULL
) {
- // Rule: If both main-contact, and other-contact have a field that
- // doesn't match, then let $mode decide if to merge it or not
+ // Rule: If both main-contact, and other-contact have a field with a
+ // different value, then let $mode decide if to merge it or not
if (
!empty($migrationInfo['rows'][$key]['main'])
&& $migrationInfo['rows'][$key]['main'] != $migrationInfo['rows'][$key]['other']
$operation = 2;
}
$locBlocks[$fieldName][$fieldCount]['operation'] = $operation;
-
+
// Ignore 'locTypeId' for websites
if ($fieldName != 'website') {
$locBlocks[$fieldName][$fieldCount]['locTypeId'] = CRM_Utils_Array::value('locTypeId', $migrationInfo['location'][$fieldName][$fieldCount]);