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) {