Merge pull request #4724 from frederic34/patch-7
Update html.formfile.class.php
This commit is contained in:
commit
fe13fe06ac
@ -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);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user