// ImageType is now applied to a them

This commit is contained in:
rGaillard
2011-12-22 21:48:40 +00:00
parent b18783b7de
commit 916fb7de9d
19 changed files with 1714 additions and 1717 deletions
@@ -1370,8 +1370,11 @@ class AdminProductsControllerCore extends AdminController
{
$imagesTypes = ImageType::getImagesTypes('products');
foreach ($imagesTypes as $k => $image_type)
if (!imageResize($tmpName, $new_path.'-'.stripslashes($image_type['name']).'.'.$image->image_format, $image_type['width'], $image_type['height'], $image->image_format))
{
$theme = (Shop::isFeatureActive() ? '-'.$image_type['id_theme'] : '');
if (!imageResize($tmpName, $new_path.'-'.stripslashes($image_type['name']).$theme.'.'.$image->image_format, $image_type['width'], $image_type['height'], $image->image_format))
$this->_errors[] = Tools::displayError('An error occurred while copying image:').' '.stripslashes($image_type['name']);
}
}
@unlink($tmpName);