X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FForm%2FMerge.php;h=ba9cfce432262c099f83075baf0f8e4bb354f569;hb=9f54f049feac72b3f20e668c02337c49c151424f;hp=8894c58df6a042ad4d78656758bb448e235c7b63;hpb=f8b254e4d2165bb713febef617f13e5f21496961;p=civicrm-core.git diff --git a/CRM/Contact/Form/Merge.php b/CRM/Contact/Form/Merge.php index 8894c58df6..ba9cfce432 100644 --- a/CRM/Contact/Form/Merge.php +++ b/CRM/Contact/Form/Merge.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.7 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2017 | + | Copyright CiviCRM LLC (c) 2004-2018 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,7 +28,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2017 + * @copyright CiviCRM LLC (c) 2004-2018 */ /** @@ -44,6 +44,11 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { var $_contactType = NULL; + /** + * @var array + */ + public $criteria = array(); + /** * Query limit to be retained in the urls. * @@ -74,8 +79,9 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { $this->_gid = $gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this, FALSE); $this->_mergeId = CRM_Utils_Request::retrieve('mergeId', 'Positive', $this, FALSE); $this->limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this, FALSE); + $this->criteria = CRM_Utils_Request::retrieve('criteria', 'Json', $this, FALSE, '{}'); - $urlParams = ['reset' => 1, 'rgid' => $this->_rgid, 'gid' => $this->_gid, 'limit' => $this->limit]; + $urlParams = ['reset' => 1, 'rgid' => $this->_rgid, 'gid' => $this->_gid, 'limit' => $this->limit, 'criteria' => $this->criteria]; $this->bounceIfInvalid($this->_cid, $this->_oid); @@ -100,7 +106,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { CRM_Core_Session::singleton()->pushUserContext($browseUrl); } - $cacheKey = CRM_Dedupe_Merger::getMergeCacheKeyString($this->_rgid, $gid); + $cacheKey = CRM_Dedupe_Merger::getMergeCacheKeyString($this->_rgid, $gid, json_decode($this->criteria, TRUE)); $join = CRM_Dedupe_Merger::getJoinOnDedupeTable(); $where = "de.id IS NULL"; @@ -244,7 +250,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { 'type' => 'next', 'name' => $this->next ? ts('Merge and go to Next Pair') : ts('Merge'), 'isDefault' => TRUE, - 'icon' => $this->next ? 'circle-triangle-e' : 'check', + 'icon' => $this->next ? 'fa-play-circle' : 'check', ); if ($this->next || $this->prev) { @@ -300,7 +306,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { $message = ''; CRM_Core_Session::setStatus($message, ts('Contacts Merged'), 'success'); - $urlParams = ['reset' => 1, 'cid' => $this->_cid, 'rgid' => $this->_rgid, 'gid' => $this->_gid, 'limit' => $this->limit]; + $urlParams = ['reset' => 1, 'cid' => $this->_cid, 'rgid' => $this->_rgid, 'gid' => $this->_gid, 'limit' => $this->limit, 'criteria' => $this->criteria]; $contactViewUrl = CRM_Utils_System::url('civicrm/contact/view', ['reset' => 1, 'cid' => $this->_cid]); if (!empty($formValues['_qf_Merge_submit'])) { @@ -314,7 +320,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { } if ($this->next && $this->_mergeId) { - $cacheKey = CRM_Dedupe_Merger::getMergeCacheKeyString($this->_rgid, $this->_gid); + $cacheKey = CRM_Dedupe_Merger::getMergeCacheKeyString($this->_rgid, $this->_gid, json_decode($this->criteria, TRUE)); $join = CRM_Dedupe_Merger::getJoinOnDedupeTable(); $where = "de.id IS NULL";