summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-09-26 09:20:42 +0000
committeralecpl <alec@alec.pl>2008-09-26 09:20:42 +0000
commit5b4562e4942a3ac733723a6a677e35da3b154ddf (patch)
tree396ee48d5cdb7b57e242542cf32be2f7cabd9ca3 /program
parent09f19e675f3396a8a0f26fecd9b0501d19a4999f (diff)
- read 'name' parameter after 'filename' and rfc2231's parameters,
Thunderbird truncate long filenames in 'name', but 'filename' contains the whole name
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index ba76b19c1..fa4cae57c 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -1182,8 +1182,6 @@ class rcube_imap
{
if (!empty($part->d_parameters['filename']))
$filename_mime = $part->d_parameters['filename'];
- else if (!empty($part->ctype_parameters['name']))
- $filename_mime = $part->ctype_parameters['name'];
else if (!empty($part->d_parameters['filename*']))
$filename_encoded = $part->d_parameters['filename*'];
else if (!empty($part->ctype_parameters['name*']))
@@ -1258,6 +1256,9 @@ class rcube_imap
}
}
}
+ // read 'name' after rfc2231 parameters as it may contains truncated filename (from Thunderbird)
+ else if (!empty($part->ctype_parameters['name']))
+ $filename_mime = $part->ctype_parameters['name'];
// Content-Disposition
else if (!empty($part->headers['content-description']))
$filename_mime = $part->headers['content-description'];