Fix displaying size of attachments with zero size

pull/5754/head
Aleksander Machniak 8 years ago
parent d6f87f81c1
commit fa462b5ab4

@ -18,6 +18,7 @@ CHANGELOG Roundcube Webmail
- 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 when moving to Trash we make sure the folder exists (#5192)
- Fix displaying size of attachments with zero size
RELEASE 1.2.1
-------------

@ -2248,11 +2248,20 @@ class rcmail extends rcube
}
else {
$size = $part->size;
if ($size === 0) {
$part->exact_size = true;
}
if ($part->encoding == 'base64') {
$size = $size / 1.33;
}
$size = '~' . $this->show_bytes($size);
$size = $this->show_bytes($size);
}
if (!$part->exact_size) {
$size = '~' . $size;
}
return $size;

@ -217,10 +217,7 @@ function rcmail_message_attachments($attrib)
$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);
$class = rcube_utils::file2class($mimetype, $filename);
$id = 'attach' . $attach_prop->mime_id;

Loading…
Cancel
Save