From a95323948eeda654e8ea72d6c89275015e461a49 Mon Sep 17 00:00:00 2001 From: thomasmars Date: Fri, 3 Mar 2017 14:47:15 +0100 Subject: [PATCH] Improved upload size error msg HFP-509 --- h5p.classes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/h5p.classes.php b/h5p.classes.php index f6227a2..d5569d1 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2959,12 +2959,12 @@ class H5PCore { $byte_threshold = 5000000; // 5MB if ($max_upload_size < $byte_threshold) { $setup->errors[] = - $this->h5pF->t('Your PHP max upload size option is too small. You should consider to increase it to more than 5MB.'); + $this->h5pF->t('Your PHP max upload size is quite small. With your current setup, you may not upload files larger than %number MB. This might be a problem when trying to upload H5Ps, images and videos. Please consider to increase it to more than 5MB.', array('%number' => number_format($max_upload_size / 1024 / 1024, 2, '.', ' '))); } if ($max_post_size < $byte_threshold) { $setup->errors[] = - $this->h5pF->t('Your PHP max post size option is too small. You should consider to increase it to more than 5MB.'); + $this->h5pF->t('Your PHP max post size is quite small. With your current setup, you may not upload files larger than %number MB. This might be a problem when trying to upload H5Ps, images and videos. Please consider to increase it to more than 5MB', array('%number' => number_format($max_upload_size / 1024 / 1024, 2, '.', ' '))); } if ($max_upload_size > $max_post_size) {