|
@@ -1448,7 +1448,7 @@ function loadAttachmentContext($id_msg)
|
|
|
'id' => $attachment['id_attach'],
|
|
|
'name' => preg_replace('~&#(\\d{1,7}|x[0-9a-fA-F]{1,6});~', '&#\\1;', htmlspecialchars($attachment['filename'])),
|
|
|
'downloads' => $attachment['downloads'],
|
|
|
- 'size' => round($attachment['filesize'] / 1024, 2) . ' ' . $txt['kilobyte'],
|
|
|
+ 'size' => ($attachment['filesize'] < 1024000) ? round($attachment['filesize'] / 1024, 2) . ' ' . $txt['kilobyte'] : round($attachment['filesize'] / 1024 / 1024, 2) . ' ' . $txt['megabyte'],
|
|
|
'byte_size' => $attachment['filesize'],
|
|
|
'href' => $scripturl . '?action=dlattach;topic=' . $topic . '.0;attach=' . $attachment['id_attach'],
|
|
|
'link' => '<a href="' . $scripturl . '?action=dlattach;topic=' . $topic . '.0;attach=' . $attachment['id_attach'] . '">' . htmlspecialchars($attachment['filename']) . '</a>',
|