put code after good id
This commit is contained in:
parent
330247ac38
commit
0afbff5d67
@ -479,13 +479,6 @@ class Ticket extends CommonObject
|
|||||||
$this->errors[] = "Error ".$this->db->lasterror();
|
$this->errors[] = "Error ".$this->db->lasterror();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error && ! empty($conf->global->TICKET_ADD_AUTHOR_AS_CONTACT)) {
|
|
||||||
// add creator as contributor
|
|
||||||
if ($this->add_contact($user->id, 'CONTRIBUTOR', 'internal') < 0) {
|
|
||||||
$error++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."ticket");
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."ticket");
|
||||||
|
|
||||||
@ -499,6 +492,13 @@ class Ticket extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$error && ! empty($conf->global->TICKET_ADD_AUTHOR_AS_CONTACT)) {
|
||||||
|
// add creator as contributor
|
||||||
|
if ($this->add_contact($user->id, 'CONTRIBUTOR', 'internal') < 0) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Update extrafield
|
//Update extrafield
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$result = $this->insertExtraFields();
|
$result = $this->insertExtraFields();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user