Fix main contact uf url on merge screen
authorJitendra Purohit <jitendra@fuzion.co.nz>
Mon, 12 Oct 2020 11:36:20 +0000 (17:06 +0530)
committerJitendra Purohit <jitendra@fuzion.co.nz>
Mon, 12 Oct 2020 11:36:20 +0000 (17:06 +0530)
CRM/Dedupe/Merger.php

index b3898072216a75a775f272e7b47d4cf49d1eabb2..e884d7247433d51863f679f9872afc9e71d79ab6 100644 (file)
@@ -1251,7 +1251,7 @@ INNER JOIN  civicrm_membership membership2 ON membership1.membership_type_id = m
       $relTables[$name]['other_url'] = str_replace('$cid', $otherId, $relTables[$name]['url']);
       if ($name === 'rel_table_users') {
         // @todo - this user url stuff is only needed for the form layer - move to CRM_Contact_Form_Merge
-        $relTables[$name]['main_url'] = str_replace('%ufid', CRM_Core_BAO_UFMatch::getUFId($otherId), $relTables[$name]['url']);
+        $relTables[$name]['main_url'] = str_replace('%ufid', CRM_Core_BAO_UFMatch::getUFId($mainId), $relTables[$name]['url']);
         $relTables[$name]['other_url'] = str_replace('%ufid', CRM_Core_BAO_UFMatch::getUFId($otherId), $relTables[$name]['url']);
       }
       if ($name === 'rel_table_memberships') {