From: Marek Bachmann Date: Sat, 26 Nov 2022 22:33:51 +0000 (+0100) Subject: using constant value for calculation of MiB output, really no need to cluclate 2... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=597f1ba9e3d8c0de14d111e18dc7b844ad99abc5;p=friendica.git using constant value for calculation of MiB output, really no need to cluclate 2**20 for just deviding the bytes by one constant divisor. --- diff --git a/mod/photos.php b/mod/photos.php index 8bbfc590a7..2aa2302a50 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -921,7 +921,7 @@ function photos_content(App $a) // When PHP is configured with upload_max_filesize less than maximagesize provide this lower limit. (($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);