// ImageType is now applied to a them

This commit is contained in:
rGaillard
2011-12-22 22:08:40 +00:00
parent b7761487c3
commit b0aeba9516
18 changed files with 111 additions and 79 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);