[-] BO : #PSCFV-2716 : Fix memory limit when upload image file

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15919 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2012-06-07 12:12:41 +00:00
parent dde916a786
commit 133a92fd40
4 changed files with 42 additions and 11 deletions
@@ -790,6 +790,11 @@ class AdminImportControllerCore extends AdminController
break;
}
$url = str_replace(' ', '%20', trim($url));
// Evaluate the memory required to resize the image: if it's too much, you can't resize it.
if (!ImageManager::checkImageMemoryLimit($url))
return false;
// 'file_exists' doesn't work on distant file, and getimagesize make the import slower.
// Just hide the warning, the traitment will be the same.
if (@copy($url, $tmpfile))