/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
}
/**
- * Funtion to create structure and add meta data according to layout.
+ * Function to create structure and add meta data according to layout.
*
* @param array $row
* Row element that needs to be formatted.
$query->convertToPseudoNames($dao);
$rows[$dao->participant_id] = array();
foreach ($returnProperties as $key => $dontCare) {
- $rows[$dao->participant_id][$key] = isset($dao->$key) ? $dao->$key : NULL;
+ $value = isset($dao->$key) ? $dao->$key : NULL;
+ // Format custom fields
+ if (strstr($key, 'custom_') && isset($value)) {
+ $value = CRM_Core_BAO_CustomField::getDisplayValue($value, substr($key, 7), $query->_options, $dao->contact_id);
+ }
+ $rows[$dao->participant_id][$key] = $value;
}
}