FIX delete line with no triggers
This commit is contained in:
parent
f4b4f2588f
commit
38fa0bed4b
@ -3747,9 +3747,10 @@ class PropaleLigne extends CommonObjectLine
|
|||||||
/**
|
/**
|
||||||
* Delete line in database
|
* Delete line in database
|
||||||
*
|
*
|
||||||
|
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||||
* @return int <0 if ko, >0 if ok
|
* @return int <0 if ko, >0 if ok
|
||||||
*/
|
*/
|
||||||
function delete()
|
function delete($notrigger=0)
|
||||||
{
|
{
|
||||||
global $conf,$user;
|
global $conf,$user;
|
||||||
|
|
||||||
@ -3773,6 +3774,8 @@ class PropaleLigne extends CommonObjectLine
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $error && ! $notrigger)
|
||||||
|
{
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('LINEPROPAL_DELETE',$user);
|
$result=$this->call_trigger('LINEPROPAL_DELETE',$user);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -3780,6 +3783,7 @@ class PropaleLigne extends CommonObjectLine
|
|||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// End call triggers
|
// End call triggers
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user