From f552f3a7d5868546e0757d9408a363d016ee42e6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 7 Jun 2016 20:51:06 +0200 Subject: [PATCH] Fix missing $notrigger on product delete --- htdocs/product/class/product.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 5a90bbf3650..36e5d7e6b26 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -879,9 +879,10 @@ class Product extends CommonObject * Delete a product from database (if not used) * * @param int $id Product id (usage of this is deprecated, delete should be called without parameters on a fetched object) + * @param int $notrigger Do not execute trigger * @return int < 0 if KO, 0 = Not possible, > 0 if OK */ - function delete($id=0) + function delete($id=0, $notrigger=0) { // Deprecation warning if ($id > 0) { @@ -914,7 +915,7 @@ class Product extends CommonObject { $this->db->begin(); - if (! $error) + if (! $error && empty($notrigger)) { // Call trigger $result=$this->call_trigger('PRODUCT_DELETE',$user);