Fix displaying size of attachments with zero size

pull/5432/head
Aleksander Machniak 8 years ago
parent e0cedf0f36
commit 650ac8befb

@ -54,6 +54,7 @@ CHANGELOG Roundcube Webmail
- Fix PHP warning when handling shared namespace with empty prefix (#5420) - Fix PHP warning when handling shared namespace with empty prefix (#5420)
- Fix so folders list is scrolled to the selected folder on page load (#5424) - Fix so folders list is scrolled to the selected folder on page load (#5424)
- Fix so when moving to Trash we make sure the folder exists (#5192) - Fix so when moving to Trash we make sure the folder exists (#5192)
- Fix displaying size of attachments with zero size
RELEASE 1.2.1 RELEASE 1.2.1
------------- -------------

@ -2350,6 +2350,10 @@ class rcmail extends rcube
else { else {
$size = $part->size; $size = $part->size;
if ($size === 0) {
$part->exact_size = true;
}
if ($part->encoding == 'base64') { if ($part->encoding == 'base64') {
$size = $size / 1.33; $size = $size / 1.33;
} }

@ -202,10 +202,7 @@ function rcmail_message_attachments($attrib)
$title = ''; $title = '';
} }
if ($attach_prop->size) {
$size = ' ' . html::span('attachment-size', '(' . rcube::Q($filesize) . ')'); $size = ' ' . html::span('attachment-size', '(' . rcube::Q($filesize) . ')');
}
$mimetype = rcmail_fix_mimetype($attach_prop->mimetype); $mimetype = rcmail_fix_mimetype($attach_prop->mimetype);
$class = rcube_utils::file2class($mimetype, $filename); $class = rcube_utils::file2class($mimetype, $filename);
$id = 'attach' . $attach_prop->mime_id; $id = 'attach' . $attach_prop->mime_id;

Loading…
Cancel
Save