Fix: missing product triggers
This commit is contained in:
parent
cd5e47b540
commit
a33988dc14
@ -366,6 +366,13 @@ class Product extends CommonObject
|
|||||||
|
|
||||||
if ($this->errno === 0)
|
if ($this->errno === 0)
|
||||||
{
|
{
|
||||||
|
// Appel des triggers
|
||||||
|
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
||||||
|
$interface=new Interfaces($this->db);
|
||||||
|
$result=$interface->run_triggers('PRODUCT_CREATE',$this,$user,$langs,$conf);
|
||||||
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
|
// Fin appel triggers
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return $id;
|
return $id;
|
||||||
}
|
}
|
||||||
@ -482,6 +489,8 @@ class Product extends CommonObject
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
$this->id = $id;
|
||||||
|
|
||||||
// Multilangs
|
// Multilangs
|
||||||
if($conf->global->MAIN_MULTILANGS)
|
if($conf->global->MAIN_MULTILANGS)
|
||||||
{
|
{
|
||||||
@ -491,6 +500,14 @@ class Product extends CommonObject
|
|||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Appel des triggers
|
||||||
|
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
||||||
|
$interface=new Interfaces($this->db);
|
||||||
|
$result=$interface->run_triggers('PRODUCT_MODIFY',$this,$user,$langs,$conf);
|
||||||
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
|
// Fin appel triggers
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user