From 602789b54eec5e930e1a39f53dbffb63db3ab488 Mon Sep 17 00:00:00 2001 From: Deepak Srivastava Date: Thu, 3 Apr 2014 13:53:57 +0530 Subject: [PATCH] let hook override autoFilp flag if required --- CRM/Dedupe/Merger.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php index 0e543f1d0a..e5ead18a83 100644 --- a/CRM/Dedupe/Merger.php +++ b/CRM/Dedupe/Merger.php @@ -622,8 +622,9 @@ INNER JOIN civicrm_membership membership2 ON membership1.membership_type_id = m CRM_Utils_Hook::merge('flip', $dupes, $dupes['dstID'], $dupes['srcID']); $mainId = $dupes['dstID']; $otherId = $dupes['srcID']; - // make sure that $mainId is the one with lower id number - if ($autoFlip && ($mainId > $otherId)) { + $isAutoFlip = CRM_Utils_Array::value('auto_flip', $dupes, $autoFlip); + // if we can, make sure that $mainId is the one with lower id number + if ($isAutoFlip && ($mainId > $otherId)) { $mainId = $dupes['srcID']; $otherId = $dupes['dstID']; } -- 2.25.1