From 8e1a7c71341087a24c14b002cff56dc06021ef15 Mon Sep 17 00:00:00 2001 From: kurund Date: Fri, 30 Aug 2013 17:15:58 +0530 Subject: [PATCH] CRM-12638, fatal error fixes due to 66ceb5d9 ---------------------------------------- * CRM-12638: Optimize Prev/Next Cache and search interaction http://issues.civicrm.org/jira/browse/CRM-12638 --- CRM/Contact/Form/Task.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Task.php b/CRM/Contact/Form/Task.php index 7fa929e571..fd97eba14f 100644 --- a/CRM/Contact/Form/Task.php +++ b/CRM/Contact/Form/Task.php @@ -156,8 +156,14 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { $cacheKey = ($sortByCharacter && $sortByCharacter != 'all') ? "{$cacheKey}_alphabet" : $cacheKey; // since we don't store all contacts in prevnextcache, when user selects "all" use query to retrieve contacts - // rather than prevnext cache table - $allCids[$cacheKey] = $form->getContactIds(); + // rather than prevnext cache table for most of the task actions except export where we rebuild query to fetch + // final result set + if ($useTable) { + $allCids = CRM_Core_BAO_PrevNextCache::getSelection($cacheKey, "getall"); + } + else { + $allCids[$cacheKey] = $form->getContactIds(); + } $form->_contactIds = array(); if ($useTable) { -- 2.25.1