// Fixed image import

This commit is contained in:
Dragan Skrbic
2013-04-29 18:07:42 +02:00
parent 7eba77ae66
commit 7f8a33763a
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -1433,9 +1433,7 @@ class AdminImportControllerCore extends AdminController
$image->position = Image::getHighestPosition($product->id) + 1;
$image->cover = (!$key && !$product_has_images) ? true : false;
// file_exists doesn't work with HTTP protocol
if (@fopen($url, 'r') == false)
$error = true;
else if (($field_error = $image->validateFields(UNFRIENDLY_ERROR, true)) === true &&
if (($field_error = $image->validateFields(UNFRIENDLY_ERROR, true)) === true &&
($lang_field_error = $image->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true && $image->add())
{
// associate image to selected shops