Skip to content
Snippets Groups Projects
Commit fe13fe06 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #4724 from frederic34/patch-7

Update html.formfile.class.php
parents cb7ae31c 902eba67
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment