Avoid calling displayValue for no reason
authorColeman Watts <coleman@civicrm.org>
Mon, 28 Dec 2015 19:14:36 +0000 (14:14 -0500)
committerColeman Watts <coleman@civicrm.org>
Mon, 28 Dec 2015 19:14:36 +0000 (14:14 -0500)
CRM/Case/XMLProcessor/Report.php

index dcb3ef9210846c28d385bd40b70aa9b435d1d42a..3d4156d6972101dc13685f8588a756f10774d495 100644 (file)
@@ -553,11 +553,13 @@ WHERE      a.id = %1
       if ($dao->fetch()) {
         $customGroup = array();
         foreach ($typeValues[$tableName] as $columnName => $typeValue) {
-          $value = CRM_Core_BAO_CustomField::displayValue($dao->$columnName, $typeValue['fieldID']);
 
           if (CRM_Utils_Array::value('type', $typeValue) == 'Date') {
             $value = $dao->$columnName;
           }
+          else {
+            $value = CRM_Core_BAO_CustomField::displayValue($dao->$columnName, $typeValue['fieldID']);
+          }
 
           if ($value) {
             // Note: this is already taken care in getDisplayValue above, but sometimes