From 9a32d7ec2f6a1735609eaf8b469774c17f4d72a8 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 7 May 2015 11:59:45 +0200 Subject: [PATCH] Fix: add $object for use with triggers --- htdocs/product/class/product.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 2987d0de8fd..c1497ce19ee 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2014 Laurent Destailleur - * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2007-2011 Jean Heimburger * Copyright (C) 2010-2013 Juanjo Menent @@ -1482,7 +1482,7 @@ class Product extends CommonObject $this->date_modification = $obj->tms; $this->import_key = $obj->import_key; $this->entity = $obj->entity; - + $this->ref_ext = $obj->ref_ext; $this->db->free($resql); @@ -3376,7 +3376,7 @@ class Product extends CommonObject $filename = preg_replace('/'.preg_quote($dir,'/').'/i','',$file); // Nom du fichier // On efface l'image d'origine - dol_delete_file($file); + dol_delete_file($file, 0, 0, 0, $this); // For triggers // Si elle existe, on efface la vignette if (preg_match('/(\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$filename,$regs))