From 902eba67d22ffa01f6710094f88222c01a3d0bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 3 Mar 2016 17:12:16 +0100 Subject: [PATCH] Update html.formfile.class.php --- htdocs/core/class/html.formfile.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 1226d3b35ba..96b4ae2805e 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -109,7 +109,10 @@ class FormFile $max=$conf->global->MAIN_UPLOAD_DOC; // En Kb $maxphp=@ini_get('upload_max_filesize'); // En inconnu + if (preg_match('/k$/i',$maxphp)) $maxphp=$maxphp*1; if (preg_match('/m$/i',$maxphp)) $maxphp=$maxphp*1024; + if (preg_match('/g$/i',$maxphp)) $maxphp=$maxphp*1024*1024; + if (preg_match('/t$/i',$maxphp)) $maxphp=$maxphp*1024*1024*1024; // Now $max and $maxphp are in Kb if ($maxphp > 0) $max=min($max,$maxphp);