diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 9c5ac5e40cb3444235ba863b81f14fa28eaf41a4..8df81f942ede58ec51fe9a8b91c2227d9ce7653b 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3747,9 +3747,10 @@ class PropaleLigne extends CommonObjectLine /** * Delete line in database * + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - function delete() + function delete($notrigger=0) { global $conf,$user; @@ -3773,13 +3774,16 @@ class PropaleLigne extends CommonObjectLine } } - // Call trigger - $result=$this->call_trigger('LINEPROPAL_DELETE',$user); - if ($result < 0) - { - $this->db->rollback(); - return -1; - } + if (! $error && ! $notrigger) + { + // Call trigger + $result=$this->call_trigger('LINEPROPAL_DELETE',$user); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } + } // End call triggers $this->db->commit();