From a2be2b191d3dfa1881a9cbd77b0ff1b918fa39d6 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Fri, 21 Mar 2014 15:20:42 +0530 Subject: [PATCH] -- fixed regression error for comment mention in http://issues.civicrm.org/jira/browse/CRM-13848?focusedCommentId=56206&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-56206, CRM-13848 --- CRM/Contribute/Form/Search.php | 58 +++++++++++++++++----------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/CRM/Contribute/Form/Search.php b/CRM/Contribute/Form/Search.php index f11aaeee11..dce312fdc6 100644 --- a/CRM/Contribute/Form/Search.php +++ b/CRM/Contribute/Form/Search.php @@ -350,43 +350,44 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search { } $config = CRM_Core_Config::singleton(); - // CRM-13848 - $financialType = CRM_Utils_Array::value('financial_type_id', $this->_formValues); - if ($financialType && is_array($financialType)) { - unset($this->_formValues['financial_type_id']); - foreach($financialType as $notImportant => $typeID) { - $this->_formValues['financial_type_id'][$typeID] = 1; + if (!empty($_POST)) { + // CRM-13848 + $financialType = CRM_Utils_Array::value('financial_type_id', $this->_formValues); + if ($financialType && is_array($financialType)) { + unset($this->_formValues['financial_type_id']); + foreach($financialType as $notImportant => $typeID) { + $this->_formValues['financial_type_id'][$typeID] = 1; + } } - } - $tags = CRM_Utils_Array::value('contact_tags', $this->_formValues); - if ($tags && !is_array($tags)) { - unset($this->_formValues['contact_tags']); - $this->_formValues['contact_tags'][$tags] = 1; - } + $tags = CRM_Utils_Array::value('contact_tags', $this->_formValues); + if ($tags && !is_array($tags)) { + unset($this->_formValues['contact_tags']); + $this->_formValues['contact_tags'][$tags] = 1; + } - if ($tags && is_array($tags)) { - unset($this->_formValues['contact_tags']); - foreach($tags as $notImportant => $tagID) { - $this->_formValues['contact_tags'][$tagID] = 1; + if ($tags && is_array($tags)) { + unset($this->_formValues['contact_tags']); + foreach($tags as $notImportant => $tagID) { + $this->_formValues['contact_tags'][$tagID] = 1; + } } - } - if (!$config->groupTree) { - $group = CRM_Utils_Array::value('group', $this->_formValues); - if ($group && !is_array($group)) { - unset($this->_formValues['group']); - $this->_formValues['group'][$group] = 1; - } + if (!$config->groupTree) { + $group = CRM_Utils_Array::value('group', $this->_formValues); + if ($group && !is_array($group)) { + unset($this->_formValues['group']); + $this->_formValues['group'][$group] = 1; + } - if ($group && is_array($group)) { - unset($this->_formValues['group']); - foreach($group as $notImportant => $groupID) { - $this->_formValues['group'][$groupID] = 1; + if ($group && is_array($group)) { + unset($this->_formValues['group']); + foreach($group as $notImportant => $groupID) { + $this->_formValues['group'][$groupID] = 1; + } } } - } CRM_Core_BAO_CustomValue::fixFieldValueOfTypeMemo($this->_formValues); @@ -454,7 +455,6 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form_Search { // if this search has been forced // then see if there are any get values, and if so over-ride the post values // note that this means that GET over-rides POST :) - if (!$this->_force) { return; } -- 2.25.1