CRM-17822 fix - Export custom fields of type country (regression)
authormonishdeb <monish.deb@webaccessglobal.com>
Fri, 22 Jan 2016 18:58:09 +0000 (00:28 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Fri, 22 Jan 2016 18:58:09 +0000 (00:28 +0530)
https://issues.civicrm.org/jira/browse/CRM-17822

CRM/Core/BAO/CustomField.php

index e73f82ac102b0ec87fce195771bb996c1abe6c00..b11c7ff7f5bd75a1b71f7d98eeb91f845e237a9d 100644 (file)
@@ -1125,16 +1125,13 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
    */
   public static function getDisplayValue($value, $id, &$options, $contactID = NULL, $fieldID = NULL) {
     $option = &$options[$id];
-    $attributes = &$option['attributes'];
-    $html_type = $attributes['html_type'];
-    $data_type = $attributes['data_type'];
-    $format = CRM_Utils_Array::value('format', $attributes);
+    $field = self::getFieldObject($id);
 
     return self::getDisplayValueCommon($value,
       $option,
-      $html_type,
-      $data_type,
-      $format,
+      $field->html_type,
+      $field->data_type,
+      NULL,
       $contactID,
       $fieldID
     );