From f6364403a9e64aaa4a0b78ad0cd6b69f55a0aa3f Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Mon, 15 Sep 2014 14:24:10 +0530 Subject: [PATCH] CRM-15280 - Advanced Search not working for deleted Contacts https://issues.civicrm.org/jira/browse/CRM-15280 --- CRM/Contact/BAO/Query.php | 3 ++- CRM/Contact/Selector.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index ca8f7693e1..aa0ecfc03e 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -4654,7 +4654,8 @@ civicrm_relationship.is_permission_a_b = 0 */ function getCachedContacts($cacheKey, $offset, $rowCount, $includeContactIds) { $this->_includeContactIds = $includeContactIds; - list($select, $from, $where) = $this->query(); + $onlyDeleted = in_array(array('deleted_contacts', '=', '1', '0', '0'), $this->_params); + list($select, $from, $where) = $this->query(FALSE, FALSE, FALSE, $onlyDeleted); $from = " FROM civicrm_prevnext_cache pnc INNER JOIN civicrm_contact contact_a ON contact_a.id = pnc.entity_id1 AND pnc.cacheKey = '$cacheKey' " . substr($from, 31); $order = " ORDER BY pnc.id"; $groupBy = " GROUP BY contact_a.id"; diff --git a/CRM/Contact/Selector.php b/CRM/Contact/Selector.php index 7d78e69459..fd1185a5f8 100644 --- a/CRM/Contact/Selector.php +++ b/CRM/Contact/Selector.php @@ -888,6 +888,7 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se 'name' => ts('View'), 'url' => 'civicrm/contact/view', 'qs' => 'reset=1&cid=%%id%%', + 'class' => 'no-popup', 'title' => ts('View Contact Details'), ), array( -- 2.25.1