Fix : [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action
Change trigger call to new function call_trigger
This commit is contained in:
parent
773caf808e
commit
a153480bc6
@ -5,8 +5,8 @@ English Dolibarr ChangeLog
|
||||
|
||||
***** ChangeLog for 3.7 compared to 3.6.* *****
|
||||
For users:
|
||||
New: [ task #867 ] Remove ESAEB external module code from core
|
||||
-
|
||||
- New: [ task #867 ] Remove ESAEB external module code from core
|
||||
- Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action
|
||||
|
||||
For translators:
|
||||
- Update language files.
|
||||
|
||||
@ -240,10 +240,8 @@ class Paiement extends CommonObject
|
||||
if (! $error)
|
||||
{
|
||||
// Appel des triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('PAYMENT_CUSTOMER_CREATE',$this,$user,$langs,$conf);
|
||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
$result=$this->call_trigger('PAYMENT_CUSTOMER_CREATE', $user);
|
||||
if ($result < 0) { $error++; }
|
||||
// Fin appel triggers
|
||||
}
|
||||
}
|
||||
@ -355,11 +353,13 @@ class Paiement extends CommonObject
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Appel des triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('PAYMENT_DELETE',$this,$user,$langs,$conf);
|
||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
// Fin appel triggers
|
||||
$result=$this->call_trigger('PAYMENT_DELETE', $user);
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
// Fin appel triggers
|
||||
}
|
||||
|
||||
$this->db->commit();
|
||||
@ -508,11 +508,9 @@ class Paiement extends CommonObject
|
||||
if (! $error && ! $notrigger)
|
||||
{
|
||||
// Appel des triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('PAYMENT_ADD_TO_BANK',$this,$user,$langs,$conf);
|
||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
// Fin appel triggers
|
||||
$result=$this->call_trigger('PAYMENT_ADD_TO_BANK', $user);
|
||||
if ($result < 0) { $error++; }
|
||||
// Fin appel triggers
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user