- read 'name' parameter after 'filename' and rfc2231's parameters,

Thunderbird truncate long filenames in 'name', but 'filename' contains the whole name
release-0.6
alecpl 16 years ago
parent 09f19e675f
commit 5b4562e494

@ -1182,8 +1182,6 @@ class rcube_imap
{ {
if (!empty($part->d_parameters['filename'])) if (!empty($part->d_parameters['filename']))
$filename_mime = $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*'])) else if (!empty($part->d_parameters['filename*']))
$filename_encoded = $part->d_parameters['filename*']; $filename_encoded = $part->d_parameters['filename*'];
else if (!empty($part->ctype_parameters['name*'])) 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 // Content-Disposition
else if (!empty($part->headers['content-description'])) else if (!empty($part->headers['content-description']))
$filename_mime = $part->headers['content-description']; $filename_mime = $part->headers['content-description'];

Loading…
Cancel
Save