From d238756a228163c77962f6f7c891b199fac87ec6 Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 22 Feb 2017 14:25:56 +1300 Subject: [PATCH] CRM-20154 dedupe code improvement, remove unused autoflip parameter --- CRM/Dedupe/Merger.php | 6 ++---- api/v3/Contact.php | 6 +----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index 183dd63b7d..16b9d3fe52 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -614,7 +614,7 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m 'join' => self::getJoinOnDedupeTable(), 'where' => self::getWhereString($batchLimit, $isSelected), ); - return CRM_Dedupe_Merger::merge($dupePairs, $cacheParams, $mode, $autoFlip, $redirectForPerformance, $checkPermissions); + return CRM_Dedupe_Merger::merge($dupePairs, $cacheParams, $mode, $redirectForPerformance, $checkPermissions); } /** @@ -748,8 +748,6 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m * Helps decide how to behave when there are conflicts. * A 'safe' value skips the merge if there are any un-resolved conflicts. * Does a force merge otherwise (aggressive mode). - * @param bool $autoFlip to let api decide which contact to retain and which to delete. - * Whether to let api decide which contact to retain and which to delete. * * @param bool $redirectForPerformance * Redirect to a url for batch processing. @@ -760,7 +758,7 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m * @return array|bool */ public static function merge($dupePairs = array(), $cacheParams = array(), $mode = 'safe', - $autoFlip = TRUE, $redirectForPerformance = FALSE, $checkPermissions = TRUE + $redirectForPerformance = FALSE, $checkPermissions = TRUE ) { $cacheKeyString = CRM_Utils_Array::value('cache_key_string', $cacheParams); $resultStats = array('merged' => array(), 'skipped' => array()); diff --git a/api/v3/Contact.php b/api/v3/Contact.php index af3028d59c..53d9255bdf 100644 --- a/api/v3/Contact.php +++ b/api/v3/Contact.php @@ -1085,7 +1085,7 @@ function civicrm_api3_contact_merge($params) { 'srcID' => $params['to_remove_id'], 'dstID' => $params['to_keep_id'], ), - ), array(), $params['mode'], $params['auto_flip'])) != FALSE) { + ), array(), $params['mode'])) != FALSE) { return civicrm_api3_create_success($result, $params); } throw new CiviCRM_API3_Exception('Merge failed'); @@ -1111,10 +1111,6 @@ function _civicrm_api3_contact_merge_spec(&$params) { 'type' => CRM_Utils_Type::T_INT, 'api.aliases' => array('other_id'), ); - $params['auto_flip'] = array( - 'title' => 'Swap destination and source to retain lowest id?', - 'api.default' => TRUE, - ); $params['mode'] = array( // @todo need more detail on what this means. 'title' => 'Dedupe mode', -- 2.25.1