From b4f95a9387a391054ad37c7cfc988ed66adc4b44 Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 19 Apr 2012 06:38:59 +0000 Subject: - Fix attachment name regression (#1488446) --- program/steps/mail/get.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'program/steps/mail') diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc index 19be4bd07..f698e38dd 100644 --- a/program/steps/mail/get.inc +++ b/program/steps/mail/get.inc @@ -151,11 +151,10 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) { $filename = rcube_label('htmlmessage'); } else { - $filename = ($MESSAGE->subject ? $MESSAGE->subject : 'roundcube'); + $ext = '.' . ($mimetype == 'text/plain' ? 'txt' : $ctype_secondary); + $filename = ($MESSAGE->subject ? $MESSAGE->subject : 'roundcube') . $ext; } - $ext = '.' . ($mimetype == 'text/plain' ? 'txt' : $ctype_secondary); - $filename .= $ext; $filename = preg_replace('[\r\n]', '', $filename); if ($browser->ie && $browser->ver < 7) -- cgit v1.2.3