From bd3872a6bb9c624eef67021ab5d14a66a497f4ce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Dec 2006 22:36:14 +0000 Subject: [PATCH] Fix: Taille max upload --- htdocs/html.form.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 59cc4909f76..348d5ce05fc 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -1767,8 +1767,11 @@ class Form print ''; $max=$conf->upload; // En Kb - $maxphp=@ini_get('upload_max_filesize'); // En Mb - if ($maxphp > 0) $max=min($max,$maxphp*1024); + $maxphp=@ini_get('upload_max_filesize'); // En inconnu + if (eregi('m$',$maxphp)) $maxphp=$maxphp*1024; + if (eregi('k$',$maxphp)) $maxphp=$maxphp; + // Now $max and $maxphp are in Kb + if ($maxphp > 0) $max=min($max,$maxphp); if ($conf->upload > 0) {