Module builder

This commit is contained in:
Laurent Destailleur 2017-11-12 20:45:06 +01:00
parent fdcbf082fd
commit 53a523ba9d

View File

@ -6173,15 +6173,23 @@ abstract class CommonObject
}
}
if (! $error && ! $notrigger) {
if (! $error)
{
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element);
}
if (!$notrigger) {
// Call triggers
$result=$this->call_trigger(strtoupper(get_class($this)).'_CREATE',$user);
if ($result < 0) { $error++; }
// End call triggers
}
if (! $error)
{
$result=$this->insertExtraFields();
if ($result < 0) $error++;
}
if (! $error && ! $notrigger)
{
// Call triggers
$result=$this->call_trigger(strtoupper(get_class($this)).'_CREATE',$user);
if ($result < 0) { $error++; }
// End call triggers
}
// Commit or rollback