// Reported bug #PSCFI-4407 about bad column id for categories and checked distant file

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12070 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vSchoener
2012-01-03 14:46:53 +00:00
parent 0a36981c3a
commit 4ab0776e19
+6 -1
View File
@@ -774,7 +774,9 @@ class AdminImportControllerCore extends AdminController
break;
}
$url = str_replace(' ', '%20', trim($url));
if (file_exists($url) && copy($url, $tmpfile))
// '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))
{
imageResize($tmpfile, $path.'.jpg');
$images_types = ImageType::getImagesTypes($entity);
@@ -809,6 +811,9 @@ class AdminImportControllerCore extends AdminController
$line = $this->utf8EncodeArray($line);
$info = self::getMaskedRow($line);
if (!isset($info['id']) || (int)$info['id'] < 2)
continue;
self::setDefaultValues($info);
$category = new Category();
self::arrayWalk($info, array('AdminImportController', 'fillInfo'), $category);