CRM-19454 - Fix unset of localised columns in custom searches
authorThomas Schüttler <tschuettler@oxfam.de>
Tue, 4 Oct 2016 11:44:28 +0000 (13:44 +0200)
committerThomas Schüttler <tschuettler@oxfam.de>
Tue, 4 Oct 2016 11:44:28 +0000 (13:44 +0200)
----------------------------------------
* 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
CRM/Contact/Form/Search/Custom/Group.php

index e2bb5aa3b76dc1c58e37bfe58cfc9354e6d4deee..88e59948e6145ad91f39bb16fb299ecde3452fc1 100644 (file)
@@ -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();
index 89295c3acd31d8b9db953568e6a79b398542c8f0..045a8b14574c3cf68655269ddfd5b13f790f4aa3 100644 (file)
@@ -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')]);
       }
     }