[-] BO : Bug fixed #PSCFV-2474 - Missing shop association when creating a manufacturer with a logo

This commit is contained in:
fBrignoli
2012-05-21 13:23:49 +00:00
parent 51ebf87dbf
commit 3c884bd365
@@ -678,6 +678,8 @@ class AdminManufacturersControllerCore extends AdminController
protected function afterImageUpload()
{
$res = true;
/* Generate image with differents size */
if (($id_manufacturer = (int)Tools::getValue('id_manufacturer')) &&
isset($_FILES) &&
@@ -687,7 +689,7 @@ class AdminManufacturersControllerCore extends AdminController
$images_types = ImageType::getImagesTypes('manufacturers');
foreach ($images_types as $k => $image_type)
{
ImageManager::resize(
$res &= ImageManager::resize(
_PS_MANU_IMG_DIR_.$id_manufacturer.'.jpg',
_PS_MANU_IMG_DIR_.$id_manufacturer.'-'.stripslashes($image_type['name']).'.jpg',
(int)$image_type['width'],
@@ -695,6 +697,11 @@ class AdminManufacturersControllerCore extends AdminController
);
}
}
if (!$res)
$this->errors[] = Tools::displayError('Unable to resize one or more pictures');
return $res;
}
}