From: j-broo Date: Mon, 11 Nov 2019 10:17:01 +0000 (+0000) Subject: Update for installations that allow large files - If file is over 1 GB, display units... X-Git-Tag: 4.1.0~14 X-Git-Url: https://git.p6c8.net/jirafeau_project.git/commitdiff_plain/18a49e2771e57b65b70ac684912295450ebb283b Update for installations that allow large files - If file is over 1 GB, display units in GB. Avoids displaying strings like "3000 MB" --- diff --git a/index.php b/index.php index 6c0a03a..9b1a4c9 100644 --- a/index.php +++ b/index.php @@ -166,8 +166,10 @@ else {

- ')"/> + ')"/>

@@ -230,9 +232,13 @@ else { 0) { + if ($cfg['maximal_upload_size'] > 0 && $cfg['maximal_upload_size'] < 1024) { echo '

' . t('FILE_LIM'); - echo " " . $cfg['maximal_upload_size'] . " MB

"; + echo " " . $cfg['maximal_upload_size'] . " MB.

"; + } + else { + echo '

' . t('FILE_LIM'); + echo " " . $cfg['maximal_upload_size']/1024 . " GB.

"; } ?>