+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
}
/**
- * Returns the related tables groups for which a contact has any info entered
+ * Returns the related tables groups for which a contact has any info entered.
*/
public static function getActiveRelTables($cid) {
$cid = (int) $cid;
}
/**
- * Return tables using locations
+ * Return tables using locations.
*/
public static function locTables() {
static $locTables;
case 'civicrm_uf_match':
// normal queries won't work for uf_match since that will lead to violation of unique constraint,
- // failing to meet intended result. Therefore we introduce this additonal query:
+ // failing to meet intended result. Therefore we introduce this additional query:
$sqls[] = "DELETE FROM civicrm_uf_match WHERE contact_id = {$mainId}";
break;
}
// Generate var $migrationInfo. The variable structure is exactly same as
// $formValues submitted during a UI merge for a pair of contacts.
- $rowsElementsAndInfo = &CRM_Dedupe_Merger::getRowsElementsAndInfo($mainId, $otherId);
+ $rowsElementsAndInfo = CRM_Dedupe_Merger::getRowsElementsAndInfo($mainId, $otherId);
$migrationInfo = &$rowsElementsAndInfo['migration_info'];
// go ahead with merge if there is no conflict
if (!CRM_Dedupe_Merger::skipMerge($mainId, $otherId, $migrationInfo, $mode)) {
CRM_Dedupe_Merger::moveAllBelongings($mainId, $otherId, $migrationInfo);
- $resultStats['merged'][] = array('main_d' => $mainId, 'other_id' => $otherId);
+ $resultStats['merged'][] = array('main_id' => $mainId, 'other_id' => $otherId);
}
else {
- $resultStats['skipped'][] = array('main_d' => $mainId, 'other_id' => $otherId);
+ $resultStats['skipped'][] = array('main_id' => $mainId, 'other_id' => $otherId);
}
// delete entry from PrevNextCache table so we don't consider the pair next time
// 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) {
- if (!array_key_exists("main_{$typeId}", $migrationInfo['main_loc_address'])) {
+ if (!array_key_exists("main_address{$typeId}", $migrationInfo['main_loc_block'])) {
$newTypeId = $typeId;
}
}
} // end of if relationshipTypeId
}
}
+
}