CRM-20775 Wrong is full results for API event get
[civicrm-core.git] / api / v3 / Attachment.php
index 39b2da995ea6cd97e3d20256688ee2234a7d7e0e..b503938b47e1471071a150772f6a33ff95373930 100644 (file)
@@ -430,6 +430,7 @@ function _civicrm_api3_attachment_format_result($fileDao, $entityFileDao, $retur
     'upload_date' => is_numeric($fileDao->upload_date) ? CRM_Utils_Date::mysqlToIso($fileDao->upload_date) : $fileDao->upload_date,
     'entity_table' => $entityFileDao->entity_table,
     'entity_id' => $entityFileDao->entity_id,
+    'icon' => CRM_Utils_File::getIconFromMimeType($fileDao->mime_type),
   );
   $result['url'] = CRM_Utils_System::url(
     'civicrm/file', 'reset=1&id=' . $result['id'] . '&eid=' . $result['entity_id'],