FIX: Intervention trigger
This commit is contained in:
parent
7d30df42a2
commit
174edb6140
@ -11,6 +11,7 @@ For users:
|
|||||||
- New: Add thirdparty to filter on events.
|
- New: Add thirdparty to filter on events.
|
||||||
- Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action
|
- Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action
|
||||||
- Fix: [ bug #1470, #1472, #1473] User trigger problem
|
- Fix: [ bug #1470, #1472, #1473] User trigger problem
|
||||||
|
- Fix: [ bug #1489, #1491 ] Intervention trigger problem
|
||||||
|
|
||||||
For translators:
|
For translators:
|
||||||
- Update language files.
|
- Update language files.
|
||||||
|
|||||||
@ -176,13 +176,10 @@ class Fichinter extends CommonObject
|
|||||||
|
|
||||||
if (! $notrigger)
|
if (! $notrigger)
|
||||||
{
|
{
|
||||||
// Appel des triggers
|
// Call trigger
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
$result=$this->call_trigger('FICHINTER_CREATE',$user);
|
||||||
$interface=new Interfaces($this->db);
|
if ($result < 0) { $error++; }
|
||||||
$result=$interface->run_triggers('FICHINTER_CREATE',$this,$user,$langs,$conf);
|
// End call triggers
|
||||||
if ($result < 0) {
|
|
||||||
$error++; $this->errors=$interface->errors;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
@ -240,14 +237,10 @@ class Fichinter extends CommonObject
|
|||||||
|
|
||||||
if (! $notrigger)
|
if (! $notrigger)
|
||||||
{
|
{
|
||||||
// Appel des triggers
|
// Call trigger
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
$result=$this->call_trigger('FICHINTER_MODIFY',$user);
|
||||||
$interface=new Interfaces($this->db);
|
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
|
||||||
$result=$interface->run_triggers('FICHINTER_MODIFY',$this,$user,$langs,$conf);
|
// End call triggers
|
||||||
if ($result < 0) {
|
|
||||||
$error++; $this->errors=$interface->errors;
|
|
||||||
}
|
|
||||||
// Fin appel triggers
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
@ -454,14 +447,10 @@ class Fichinter extends CommonObject
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
// Appel des triggers
|
// Call trigger
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
$result=$this->call_trigger('FICHINTER_VALIDATE',$user);
|
||||||
$interface=new Interfaces($this->db);
|
if ($result < 0) { $error++; }
|
||||||
$result=$interface->run_triggers('FICHINTER_VALIDATE',$this,$user,$langs,$conf);
|
// End call triggers
|
||||||
if ($result < 0) {
|
|
||||||
$error++; $this->errors=$interface->errors;
|
|
||||||
}
|
|
||||||
// Fin appel triggers
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
@ -762,14 +751,10 @@ class Fichinter extends CommonObject
|
|||||||
|
|
||||||
if (! $notrigger)
|
if (! $notrigger)
|
||||||
{
|
{
|
||||||
// Appel des triggers
|
// Call trigger
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
$result=$this->call_trigger('FICHINTER_DELETE',$user);
|
||||||
$interface=new Interfaces($this->db);
|
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
|
||||||
$result=$interface->run_triggers('FICHINTER_DELETE',$this,$user,$langs,$conf);
|
// End call triggers
|
||||||
if ($result < 0) {
|
|
||||||
$error++; $this->errors=$interface->errors;
|
|
||||||
}
|
|
||||||
// Fin appel triggers
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
@ -1137,14 +1122,10 @@ class FichinterLigne
|
|||||||
|
|
||||||
if (! $notrigger)
|
if (! $notrigger)
|
||||||
{
|
{
|
||||||
// Appel des triggers
|
// Call trigger
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
$result=$this->call_trigger('LINEFICHINTER_CREATE',$user);
|
||||||
$interface=new Interfaces($this->db);
|
if ($result < 0) { $error++; }
|
||||||
$resulttrigger=$interface->run_triggers('LINEFICHINTER_CREATE',$this,$user,$langs,$conf);
|
// End call triggers
|
||||||
if ($resulttrigger < 0) {
|
|
||||||
$error++; $this->errors=$interface->errors;
|
|
||||||
}
|
|
||||||
// Fin appel triggers
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1199,14 +1180,10 @@ class FichinterLigne
|
|||||||
|
|
||||||
if (! $notrigger)
|
if (! $notrigger)
|
||||||
{
|
{
|
||||||
// Appel des triggers
|
// Call trigger
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
$result=$this->call_trigger('LINEFICHINTER_UPDATE',$user);
|
||||||
$interface=new Interfaces($this->db);
|
if ($result < 0) { $error++; }
|
||||||
$resulttrigger=$interface->run_triggers('LINEFICHINTER_UPDATE',$this,$user,$langs,$conf);
|
// End call triggers
|
||||||
if ($resulttrigger < 0) {
|
|
||||||
$error++; $this->errors=$interface->errors;
|
|
||||||
}
|
|
||||||
// Fin appel triggers
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1217,7 +1194,6 @@ class FichinterLigne
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->lasterror();
|
|
||||||
dol_syslog("FichinterLigne::update Error ".$this->error, LOG_ERR);
|
dol_syslog("FichinterLigne::update Error ".$this->error, LOG_ERR);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
@ -1309,21 +1285,16 @@ class FichinterLigne
|
|||||||
$result = $this->update_total();
|
$result = $this->update_total();
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$this->db->commit();
|
|
||||||
|
|
||||||
if (! $notrigger)
|
if (! $notrigger)
|
||||||
{
|
{
|
||||||
// Appel des triggers
|
// Call trigger
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
$result=$this->call_trigger('LINEFICHINTER_DELETE',$user);
|
||||||
$interface=new Interfaces($this->db);
|
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
|
||||||
$resulttrigger=$interface->run_triggers('LINEFICHINTER_DELETE',$this,$user,$langs,$conf);
|
// End call triggers
|
||||||
if ($resulttrigger < 0) {
|
|
||||||
$error++; $this->errors=$interface->errors;
|
|
||||||
}
|
|
||||||
// Fin appel triggers
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
$this->db->commit();
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user