mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix: [ bug #1501 ] DEPLACEMENT_CREATE trigger do not intercept trigger action
This commit is contained in:
parent
4666de85e2
commit
c70bdabeda
|
|
@ -22,6 +22,7 @@ For users:
|
|||
- Fix: [ bug #1498, #1499 ] Shipment/Delivery triggers problem
|
||||
- Fix: [ bug #1465, #1466 ] Product triggers problem
|
||||
- Fix: [ bug #1508 ] STOCK_MOVEMENT does not show trigger error message
|
||||
- Fix: [ bug #1501 ] DEPLACEMENT_CREATE trigger do not intercept trigger action
|
||||
|
||||
|
||||
For translators:
|
||||
|
|
|
|||
|
|
@ -126,15 +126,15 @@ class Deplacement extends CommonObject
|
|||
{
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."deplacement");
|
||||
|
||||
// Appel des triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('DEPLACEMENT_CREATE',$this,$user,$langs,$conf);
|
||||
if ($result < 0) {
|
||||
$error++; $this->errors=$interface->errors;
|
||||
}
|
||||
// Fin appel triggers
|
||||
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('DEPLACEMENT_CREATE',$user);
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
// End call triggers
|
||||
|
||||
$result=$this->update($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user