CRM_Core_Error::statusBounce(ts('The selected pair of contacts are marked as non duplicates. If these records should be merged, you can remove this exception on the <a href="%1">Dedupe Exceptions</a> page.', array(1 => CRM_Utils_System::url('civicrm/dedupe/exception', 'reset=1'))));
}
$this->_contactType = civicrm_api3('Contact', 'getvalue', array('id' => $cid, 'return' => 'contact_type'));
+ $isFromDedupeScreen = TRUE;
if (!$this->_rgid) {
+ $isFromDedupeScreen = FALSE;
$this->_rgid = civicrm_api3('RuleGroup', 'getvalue', array(
'contact_type' => $this->_contactType,
'used' => 'Supervised',
$session = CRM_Core_Session::singleton();
// context fixed.
- if ($this->_rgid) {
+ if ($isFromDedupeScreen) {
$urlParam = "reset=1&action=browse&rgid={$this->_rgid}";
if ($gid) {
$urlParam .= "&gid={$gid}";
}
- $session->pushUserContext(CRM_Utils_System::url('civicrm/contact/dedupefind', $urlParam));
+ $browseUrl = CRM_Utils_System::url('civicrm/contact/dedupefind', $urlParam);
+ $session->pushUserContext($browseUrl);
}
+ $this->assign('browseUrl', empty($browseUrl) ? '' : $browseUrl);
// ensure that oid is not the current user, if so refuse to do the merge
if ($session->get('userID') == $oid) {
</div>
<div class="action-link">
- <a href="#" class="action-item crm-hover-button crm-notDuplicate" title={ts}Mark this pair as not a duplicate.{/ts} onClick="processDupes( {$main_cid}, {$other_cid}, 'dupe-nondupe', 'merge-contact', '{if $rgid}{crmURL p="civicrm/contact/dedupefind" q="reset=1&action=update&rgid=$rgid"}{/if}' );return false;">
+ <a href="#" class="action-item crm-hover-button crm-notDuplicate" title={ts}Mark this pair as not a duplicate.{/ts} onClick="processDupes( {$main_cid}, {$other_cid}, 'dupe-nondupe', 'merge-contact', '{$browseUrl}' );return false;">
<i class="crm-i fa-times-circle"></i>
{ts}Mark this pair as not a duplicate.{/ts}
</a>
cj( '#processDupes' ).hide( );
-function processDupes( cid, oid, oper, context, reloadURL ) {
+function processDupes(cid, oid, oper, context, reloadURL) {
//currently we are doing in a single way.
//later we might want two way operations.