From fd39508bc58205bf5dc8fdffcbd535baa82554f0 Mon Sep 17 00:00:00 2001 From: Alasdair Campbell Date: Tue, 4 Nov 2014 23:02:49 +0000 Subject: [PATCH] Rename event invitiation attachments to match the event type --- application/Espo/Modules/Crm/Business/Event/Invitations.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/Espo/Modules/Crm/Business/Event/Invitations.php b/application/Espo/Modules/Crm/Business/Event/Invitations.php index 854736a26d..781bdbb075 100644 --- a/application/Espo/Modules/Crm/Business/Event/Invitations.php +++ b/application/Espo/Modules/Crm/Business/Event/Invitations.php @@ -107,9 +107,10 @@ class Invitations $email->set('isHtml', true); $this->getEntityManager()->saveEntity($email); + $attachmentName = ucwords($this->language->translate($entity->getEntityName(), 'scopeNames')).'.ics'; $attachment = $this->getEntityManager()->getEntity('Attachment'); $attachment->set(array( - 'name' => 'event.ics', + 'name' => $attachmentName, 'type' => 'text/calendar', 'contents' => $this->getIscContents($entity), ));