1
0
Fork 0

using constant value for calculation of MiB output, really no need to cluclate 2**20 for just deviding the bytes by one constant divisor.

This commit is contained in:
Marek Bachmann 2022-11-26 23:33:51 +01:00
parent 54289b2d08
commit 597f1ba9e3

View file

@ -921,7 +921,7 @@ function photos_content(App $a)
// When PHP is configured with upload_max_filesize less than maximagesize provide this lower limit. // When PHP is configured with upload_max_filesize less than maximagesize provide this lower limit.
(($umf_bytes < $mis_bytes) || ! is_numeric($mis_bytes)) ? (($umf_bytes < $mis_bytes) || ! is_numeric($mis_bytes)) ?
($maximagesize_Mbytes = ($umf_bytes / (10 ** 6))) : ($maximagesize_Mbytes = ($mis_bytes / (10 ** 6))); ($maximagesize_Mbytes = ($umf_bytes / 1048576)) : ($maximagesize_Mbytes = ($mis_bytes / 1048576));
$usage_message = DI::l10n()->t('The maximum accepted image size is %.3g MB', $maximagesize_Mbytes); $usage_message = DI::l10n()->t('The maximum accepted image size is %.3g MB', $maximagesize_Mbytes);