From: Thomas Schüttler Date: Tue, 4 Oct 2016 11:44:28 +0000 (+0200) Subject: CRM-19454 - Fix unset of localised columns in custom searches X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ee8fbc3964065b72168c055b899239b049551536;p=civicrm-core.git 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 --- 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')]); } }