CRM-15280 - Advanced Search not working for deleted Contacts
authoratif-shaikh <shaikh388@gmail.com>
Mon, 15 Sep 2014 08:54:10 +0000 (14:24 +0530)
committerEileen McNaughton <eileen@fuzion.co.nz>
Thu, 2 Oct 2014 02:49:19 +0000 (15:49 +1300)
https://issues.civicrm.org/jira/browse/CRM-15280

CRM/Contact/BAO/Query.php
CRM/Contact/Selector.php

index 546d1ceb56a9ba94a9a8df8af0438101a6b21a26..381ced224b37361b308970c25e201623f65f9cb4 100644 (file)
@@ -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";
index d6a8bfc37de19765e2ea3d5710a6f8ea55259a4c..42d22ab7cd3478533a4e80353fe063525aac6289 100644 (file)
@@ -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(