[-] BO : fixed bug #PSCFI-1429 - Deleting products does not remove image files

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@5913 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-04-15 10:10:23 +00:00
parent cfdc0ab1d9
commit 8c520c66a3
2 changed files with 9 additions and 3 deletions
+8 -2
View File
@@ -45,7 +45,7 @@ class AdminProducts extends AdminTab
$this->view = false;
$this->duplicate = true;
$this->imageType = 'jpg';
$this->fieldsDisplay = array(
'id_product' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 20),
'image' => array('title' => $this->l('Photo'), 'align' => 'center', 'image' => 'p', 'width' => 45, 'orderby' => false, 'filter' => false, 'search' => false),
@@ -350,7 +350,13 @@ class AdminProducts extends AdminTab
$id_category = Tools::getValue('id_category');
$category_url = empty($id_category) ? '' : '&id_category='.$id_category;
$this->deleteImage($object->id);
if ($this->table == 'product')
{
$product = new Product($object->id);
$product->deleteImages();
}else
$this->deleteImage($object->id);
if ($this->deleted)
{
$object->deleted = 1;