From 23379b497b7abcb4d5b208abe685dc9b10ea2565 Mon Sep 17 00:00:00 2001 From: kurund Date: Tue, 27 Aug 2013 14:55:43 +0530 Subject: [PATCH] CRM-12638, fixed group status ---------------------------------------- * CRM-12638: Optimize Prev/Next Cache and search interaction http://issues.civicrm.org/jira/browse/CRM-12638 --- CRM/Contact/BAO/Query.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 303d130dc0..ba6a47d534 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -4388,12 +4388,13 @@ civicrm_relationship.start_date > {$today} */ function getCachedContacts($cacheKey, $offset, $rowCount, $includeContactIds) { $this->_includeContactIds = $includeContactIds; - list($select, $from) = $this->query(); + list($select, $from, $where) = $this->query(); $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"; $limit = " LIMIT $offset, $rowCount"; - $query = "$select $from $groupBy $order $limit"; + $query = "$select $from $where $groupBy $order $limit"; + return CRM_Core_DAO::executeQuery($query); } -- 2.25.1