From af7e94a65e922cd2c77d6d4dc1184dbaa02a2db5 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 27 Jun 2019 23:37:19 +1200 Subject: [PATCH] dev/core#1074 fix failure of actions from manage groups screen --- CRM/Contact/Form/Search.php | 15 +++++++-------- CRM/Contact/Form/Task.php | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CRM/Contact/Form/Search.php b/CRM/Contact/Form/Search.php index 30090566db..d0c3a9591a 100644 --- a/CRM/Contact/Form/Search.php +++ b/CRM/Contact/Form/Search.php @@ -777,14 +777,6 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { //for prev/next pagination $crmPID = CRM_Utils_Request::retrieve('crmPID', 'Integer'); - if (array_key_exists($this->_searchButtonName, $_POST) || - ($this->_force && !$crmPID) - ) { - //reset the cache table for new search - $cacheKey = "civicrm search {$this->controller->_key}"; - Civi::service('prevnext')->deleteItem(NULL, $cacheKey); - } - //get the button name $buttonName = $this->controller->getButtonName(); @@ -822,6 +814,13 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { return; } else { + if (array_key_exists($this->_searchButtonName, $_POST) || + ($this->_force && !$crmPID) + ) { + //reset the cache table for new search + $cacheKey = "civicrm search {$this->controller->_key}"; + Civi::service('prevnext')->deleteItem(NULL, $cacheKey); + } $output = CRM_Core_Selector_Controller::SESSION; // create the selector, controller and run - store results in session diff --git a/CRM/Contact/Form/Task.php b/CRM/Contact/Form/Task.php index 78d0275520..2f049dda00 100644 --- a/CRM/Contact/Form/Task.php +++ b/CRM/Contact/Form/Task.php @@ -546,7 +546,7 @@ class CRM_Contact_Form_Task extends CRM_Core_Form_Task { // Advanced search sets queryParams, for builder you need formValues. // This is kinda fragile but .... see CRM_Mailing_Form_Task_AdhocMailingTest for test effort. // Moral never touch anything ever again and the house of cards will stand tall, unless there is a breeze - 'form_values' => $this->get('isSearchBuilder') ? $this->get('formValues') : $this->get('queryParams'), + 'form_values' => $this->get('isSearchBuilder') ? $this->get('formValues') : $this->get('queryParams'), 'saved_search_id' => $ssId, 'search_custom_id' => $this->get('customSearchID'), 'search_context' => $this->get('context'), -- 2.25.1