From c159f75e484d1b202345170a32c505a521d57eb4 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 29 Mar 2016 13:37:38 +0200 Subject: [PATCH] Fix missing file size of attached ics file in mail compose --- plugins/calendar/calendar.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index c7dbba4a..6dfac691 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -3300,7 +3300,12 @@ class calendar extends rcube_plugin $tmp_path = tempnam($this->rc->config->get('temp_dir'), 'rcmAttmntCal'); file_put_contents($tmp_path, $this->get_ical()->export(array($event), '', false, array($this->driver, 'get_attachment_body'))); - $args['attachments'][] = array('path' => $tmp_path, 'name' => $filename . '.ics', 'mimetype' => 'text/calendar'); + $args['attachments'][] = array( + 'path' => $tmp_path, + 'name' => $filename . '.ics', + 'mimetype' => 'text/calendar', + 'size' => filesize($tmp_path), + ); $args['param']['subject'] = $event['title']; } }