From 9e7eeb0fa1bda0feab609ac4c57f683d11e6bc7e Mon Sep 17 00:00:00 2001 From: yashodha Date: Mon, 29 Apr 2013 23:22:09 +0530 Subject: [PATCH] CRM-12426 --- CRM/Event/BAO/Event.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 759b9cf48f..e9c460bd32 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -1357,6 +1357,7 @@ WHERE civicrm_event.is_active = 1 $imProviders = CRM_Core_PseudoConstant::IMProvider(); //start of code to set the default values foreach ($fields as $name => $field) { + $skip = FALSE; // skip fields that should not be displayed separately if ($field['skipDisplay']) { continue; @@ -1532,10 +1533,11 @@ WHERE id = $cfID $customVal = (float )($params[$name]); } elseif ($dao->data_type == 'Date') { - $date = CRM_Utils_Date::format($params[$name], NULL, 'invalidDate'); - if ($date != 'invalidDate') { - $customVal = $date; + $customVal = $displayValue = $params[$name]; + if (!empty($params[$name . '_time'])) { + $customVal = $displayValue = $params[$name] . ' ' . $params[$name . '_time']; } + $skip = TRUE; } else { $customVal = $params[$name]; @@ -1544,8 +1546,9 @@ WHERE id = $cfID $returnProperties = array($name => 1); $query = new CRM_Contact_BAO_Query($params, $returnProperties, $fields); $options = &$query->_options; - $displayValue = CRM_Core_BAO_CustomField::getDisplayValue($customVal, $cfID, $options); - + if (!$skip) { + $displayValue = CRM_Core_BAO_CustomField::getDisplayValue($customVal, $cfID, $options); + } //Hack since we dont have function to check empty. //FIXME in 2.3 using crmIsEmptyArray() $customValue = TRUE; -- 2.25.1