From: kurund Date: Tue, 27 Aug 2013 09:05:13 +0000 (+0530) Subject: CRM-12638, use query instead of cache table if 'select all' option is uses X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=66ceb5d9c640766b002421c2623627bafd33b30d;p=civicrm-core.git CRM-12638, use query instead of cache table if 'select all' option is uses ---------------------------------------- * CRM-12638: Optimize Prev/Next Cache and search interaction http://issues.civicrm.org/jira/browse/CRM-12638 --- diff --git a/CRM/Contact/Form/Task.php b/CRM/Contact/Form/Task.php index 936405cd73..7fa929e571 100644 --- a/CRM/Contact/Form/Task.php +++ b/CRM/Contact/Form/Task.php @@ -155,12 +155,9 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { $sortByCharacter = $form->get('sortByCharacter'); $cacheKey = ($sortByCharacter && $sortByCharacter != 'all') ? "{$cacheKey}_alphabet" : $cacheKey; - if ($form->_action == CRM_Core_Action::COPY) { - $allCids[$cacheKey] = $form->getContactIds(); - } - else { - $allCids = CRM_Core_BAO_PrevNextCache::getSelection($cacheKey, "getall"); - } + // 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(); $form->_contactIds = array(); if ($useTable) { @@ -305,7 +302,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form { if (!$queryOperator) { $queryOperator = 'AND'; } - $dao = & $selector->contactIDQuery($params, $this->_action, $sortID, + $dao = $selector->contactIDQuery($params, $this->_action, $sortID, CRM_Utils_Array::value('display_relationship_type', $fv), $queryOperator );