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.* *****
|
***** ChangeLog for 3.7 compared to 3.6.* *****
|
||||||
For users:
|
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:
|
For translators:
|
||||||
- Update language files.
|
- Update language files.
|
||||||
|
|||||||
@ -240,10 +240,8 @@ class Paiement extends CommonObject
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
$result=$this->call_trigger('PAYMENT_CUSTOMER_CREATE', $user);
|
||||||
$interface=new Interfaces($this->db);
|
if ($result < 0) { $error++; }
|
||||||
$result=$interface->run_triggers('PAYMENT_CUSTOMER_CREATE',$this,$user,$langs,$conf);
|
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -355,11 +353,13 @@ class Paiement extends CommonObject
|
|||||||
if (! $notrigger)
|
if (! $notrigger)
|
||||||
{
|
{
|
||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
$result=$this->call_trigger('PAYMENT_DELETE', $user);
|
||||||
$interface=new Interfaces($this->db);
|
if ($result < 0)
|
||||||
$result=$interface->run_triggers('PAYMENT_DELETE',$this,$user,$langs,$conf);
|
{
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
$this->db->rollback();
|
||||||
// Fin appel triggers
|
return -1;
|
||||||
|
}
|
||||||
|
// Fin appel triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
@ -508,11 +508,9 @@ class Paiement extends CommonObject
|
|||||||
if (! $error && ! $notrigger)
|
if (! $error && ! $notrigger)
|
||||||
{
|
{
|
||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
$result=$this->call_trigger('PAYMENT_ADD_TO_BANK', $user);
|
||||||
$interface=new Interfaces($this->db);
|
if ($result < 0) { $error++; }
|
||||||
$result=$interface->run_triggers('PAYMENT_ADD_TO_BANK',$this,$user,$langs,$conf);
|
// Fin appel triggers
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
|
||||||
// Fin appel triggers
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user