// Reported bug #PSCFI-4407 about bad column id for categories and checked distant file
This commit is contained in:
@@ -774,7 +774,9 @@ class AdminImportControllerCore extends AdminController
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$url = str_replace(' ', '%20', trim($url));
|
$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');
|
imageResize($tmpfile, $path.'.jpg');
|
||||||
$images_types = ImageType::getImagesTypes($entity);
|
$images_types = ImageType::getImagesTypes($entity);
|
||||||
@@ -809,6 +811,9 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$line = $this->utf8EncodeArray($line);
|
$line = $this->utf8EncodeArray($line);
|
||||||
$info = self::getMaskedRow($line);
|
$info = self::getMaskedRow($line);
|
||||||
|
|
||||||
|
if (!isset($info['id']) || (int)$info['id'] < 2)
|
||||||
|
continue;
|
||||||
|
|
||||||
self::setDefaultValues($info);
|
self::setDefaultValues($info);
|
||||||
$category = new Category();
|
$category = new Category();
|
||||||
self::arrayWalk($info, array('AdminImportController', 'fillInfo'), $category);
|
self::arrayWalk($info, array('AdminImportController', 'fillInfo'), $category);
|
||||||
|
|||||||
Reference in New Issue
Block a user