From: atif-shaikh Date: Mon, 15 Sep 2014 08:54:10 +0000 (+0530) Subject: CRM-15280 - Advanced Search not working for deleted Contacts X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=55c743a80dee05709ea0f22b24b6376584be9aee;p=civicrm-core.git CRM-15280 - Advanced Search not working for deleted Contacts https://issues.civicrm.org/jira/browse/CRM-15280 --- diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 546d1ceb56..381ced224b 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -4432,7 +4432,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 d6a8bfc37d..42d22ab7cd 100644 --- a/CRM/Contact/Selector.php +++ b/CRM/Contact/Selector.php @@ -838,6 +838,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(