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

This commit is contained in:
vSchoener
2012-01-03 14:46:53 +00:00
parent af2f3ca82e
commit 1259ea63c6
+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);