[-] 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
This commit is contained in:
1 parent
da1a21fd2d
commit
54fd09b72e
1 file changed
+8
-1
@@ -678,6 +678,8 @@ class AdminManufacturersControllerCore extends AdminController
|
|||||||
|
|
||||||
protected function afterImageUpload()
|
protected function afterImageUpload()
|
||||||
{
|
{
|
||||||
|
$res = true;
|
||||||
|
|
||||||
/* Generate image with differents size */
|
/* Generate image with differents size */
|
||||||
if (($id_manufacturer = (int)Tools::getValue('id_manufacturer')) &&
|
if (($id_manufacturer = (int)Tools::getValue('id_manufacturer')) &&
|
||||||
isset($_FILES) &&
|
isset($_FILES) &&
|
||||||
@@ -687,7 +689,7 @@ class AdminManufacturersControllerCore extends AdminController
|
|||||||
$images_types = ImageType::getImagesTypes('manufacturers');
|
$images_types = ImageType::getImagesTypes('manufacturers');
|
||||||
foreach ($images_types as $k => $image_type)
|
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.'.jpg',
|
||||||
_PS_MANU_IMG_DIR_.$id_manufacturer.'-'.stripslashes($image_type['name']).'.jpg',
|
_PS_MANU_IMG_DIR_.$id_manufacturer.'-'.stripslashes($image_type['name']).'.jpg',
|
||||||
(int)$image_type['width'],
|
(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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user