From 18a49e2771e57b65b70ac684912295450ebb283b Mon Sep 17 00:00:00 2001 From: j-broo Date: Mon, 11 Nov 2019 10:17:01 +0000 Subject: [PATCH] Update for installations that allow large files - If file is over 1 GB, display units in GB. Avoids displaying strings like "3000 MB" --- index.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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.

"; } ?> -- 2.34.1