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

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8482 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-09-12 09:14:07 +00:00
parent 77a4815ef0
commit a3245e4093
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;
}
}
/**