From ee8fbc3964065b72168c055b899239b049551536 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Sch=C3=BCttler?= Date: Tue, 4 Oct 2016 13:44:28 +0200 Subject: [PATCH] CRM-19454 - Fix unset of localised columns in custom searches ---------------------------------------- * CRM-19454: Unset of localised columns fails in some custom searches https://issues.civicrm.org/jira/browse/CRM-19454 --- CRM/Contact/Form/Search/Custom/EventAggregate.php | 2 +- CRM/Contact/Form/Search/Custom/Group.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CRM/Contact/Form/Search/Custom/EventAggregate.php b/CRM/Contact/Form/Search/Custom/EventAggregate.php index e2bb5aa3b7..88e59948e6 100644 --- a/CRM/Contact/Form/Search/Custom/EventAggregate.php +++ b/CRM/Contact/Form/Search/Custom/EventAggregate.php @@ -155,7 +155,7 @@ class CRM_Contact_Form_Search_Custom_EventAggregate extends CRM_Contact_Form_Sea on civicrm_contact.id = civicrm_participant.contact_id"; } else { - unset($this->_columns['Participant']); + unset($this->_columns[ts('Participant')]); } $where = $this->where(); diff --git a/CRM/Contact/Form/Search/Custom/Group.php b/CRM/Contact/Form/Search/Custom/Group.php index 89295c3acd..045a8b1457 100644 --- a/CRM/Contact/Form/Search/Custom/Group.php +++ b/CRM/Contact/Form/Search/Custom/Group.php @@ -174,19 +174,19 @@ class CRM_Contact_Form_Search_Custom_Group extends CRM_Contact_Form_Search_Custo //distinguish column according to user selection if (($this->_includeGroups && !$this->_includeTags)) { - unset($this->_columns['Tag Name']); + unset($this->_columns[ts('Tag Name')]); $selectClause .= ", GROUP_CONCAT(DISTINCT group_names ORDER BY group_names ASC ) as gname"; } elseif ($this->_includeTags && (!$this->_includeGroups)) { - unset($this->_columns['Group Name']); + unset($this->_columns[ts('Group Name')]); $selectClause .= ", GROUP_CONCAT(DISTINCT tag_names ORDER BY tag_names ASC ) as tname"; } elseif (!empty($this->_includeTags) && !empty($this->_includeGroups)) { $selectClause .= ", GROUP_CONCAT(DISTINCT group_names ORDER BY group_names ASC ) as gname , GROUP_CONCAT(DISTINCT tag_names ORDER BY tag_names ASC ) as tname"; } else { - unset($this->_columns['Tag Name']); - unset($this->_columns['Group Name']); + unset($this->_columns[ts('Tag Name')]); + unset($this->_columns[ts('Group Name')]); } } -- 2.25.1