Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2022-05-17 00:53:16 +02:00
commit b51465434c

View File

@ -487,15 +487,6 @@ class Ticket extends CommonObject
if (!$error) {
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."ticket");
if (!$notrigger) {
// Call trigger
$result = $this->call_trigger('TICKET_CREATE', $user);
if ($result < 0) {
$error++;
}
// End call triggers
}
}
if (!$error && ! empty($conf->global->TICKET_ADD_AUTHOR_AS_CONTACT)) {
@ -513,6 +504,15 @@ class Ticket extends CommonObject
}
}
if (!$error && !$notrigger) {
// Call trigger
$result = $this->call_trigger('TICKET_CREATE', $user);
if ($result < 0) {
$error++;
}
// End call triggers
}
// Commit or rollback
if ($error) {
foreach ($this->errors as $errmsg) {