CRM-15160 Fix for communication_style and other options
authorJitendra Purohit <jitendra.purohit@webaccessglobal.com>
Mon, 25 Aug 2014 10:02:13 +0000 (15:32 +0530)
committerJitendra Purohit <jitendra.purohit@webaccessglobal.com>
Mon, 25 Aug 2014 10:02:13 +0000 (15:32 +0530)
CRM/Badge/BAO/Badge.php
CRM/Contact/BAO/Query.php

index eca1c03461cd25b91c07f970dfaf0f9430b1ee0c..a86aef7c7f552654cfe7e5e5e32d280fab232e8d 100644 (file)
@@ -475,12 +475,7 @@ class CRM_Badge_BAO_Badge {
     $dao = CRM_Core_DAO::executeQuery($queryString);
     $rows = array();
     while ($dao->fetch()) {
-      if (!empty($dao->country_id)) {
-        $dao->country = CRM_Core_PseudoConstant::country($dao->country_id);
-      }
-      if (!empty($dao->state_province_id)) {
-        $dao->state_province = CRM_Core_PseudoConstant::stateProvince($dao->state_province_id);
-      }
+      $query->convertToPseudoNames($dao);
       $rows[$dao->participant_id] = array();
       foreach ($returnProperties as $key => $dontCare) {
         $rows[$dao->participant_id][$key] = isset($dao->$key) ? $dao->$key : NULL;
index 5dd767f493501086597be0be44a22cfa789b5bab..4821f15a15d8238cc8ee3f6fd113f0b1b3a25cef 100644 (file)
@@ -659,7 +659,7 @@ class CRM_Contact_BAO_Query {
         }
       }
 
-      if (in_array($name, array('prefix_id', 'suffix_id', 'gender_id'))) {
+      if (in_array($name, array('prefix_id', 'suffix_id', 'gender_id', 'communication_style_id'))) {
         if (CRM_Utils_Array::value($field['pseudoconstant']['optionGroupName'], $this->_returnProperties)) {
           $makeException = TRUE;
         }