[*] BO : Removed size limit for image upload (BL006, CC136)

This commit is contained in:
tDidierjean
2011-09-12 09:14:07 +00:00
parent beea76b0bd
commit 7cd878079c
17 changed files with 43 additions and 51 deletions
+17
View File
@@ -2120,6 +2120,23 @@ FileETag INode MTime Size
return $req;
}
/**
* Get max file upload size considering server settings and optional max value
*
* @param int $max_size optional max file size
* @return int max file size in bytes
*/
public static function getMaxUploadSize($max_size = 0)
{
$post_max_size = self::convertBytes(ini_get('post_max_size'));
$upload_max_filesize = self::convertBytes(ini_get('upload_max_filesize'));
if ($max_size > 0)
$result = min($post_max_size, $upload_max_filesize, $max_size);
else
$result = min($post_max_size, $upload_max_filesize);
return $result;
}
}
/**