From 54fd09b72e21bf723d77092dab0bebdd05839708 Mon Sep 17 00:00:00 2001 From: fBrignoli Date: Mon, 21 May 2012 13:23:49 +0000 Subject: [PATCH] [-] BO : Bug fixed #PSCFV-2474 - Missing shop association when creating a manufacturer with a logo git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15498 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminManufacturersController.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/controllers/admin/AdminManufacturersController.php b/controllers/admin/AdminManufacturersController.php index 41a5d7d2d..daa70fc08 100644 --- a/controllers/admin/AdminManufacturersController.php +++ b/controllers/admin/AdminManufacturersController.php @@ -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; } }