From: Deepak Srivastava Date: Thu, 3 Apr 2014 08:23:57 +0000 (+0530) Subject: let hook override autoFilp flag if required X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=602789b54eec5e930e1a39f53dbffb63db3ab488;p=civicrm-core.git let hook override autoFilp flag if required --- 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']; }