[*] 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
@@ -75,8 +75,6 @@ class blockreinsurance extends Module
public function addToDB()
{
$maxImageSize = 3007200;
if(isset($_POST['nbblocks']))
{
for($i = 1; $i <= (int)$_POST['nbblocks']; $i++)
@@ -84,7 +82,7 @@ class blockreinsurance extends Module
$filename = explode('.', $_FILES['info'.$i.'_file']['name']);
if (isset($_FILES['info'.$i.'_file']) AND isset($_FILES['info'.$i.'_file']['tmp_name']) AND !empty($_FILES['info'.$i.'_file']['tmp_name']))
{
if ($error = checkImage($_FILES['info'.$i.'_file'], $maxImageSize))
if ($error = checkImage($_FILES['info'.$i.'_file']))
return false;
elseif (!$tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS') OR !move_uploaded_file($_FILES['info'.$i.'_file']['tmp_name'], $tmpName))
return false;