fix: 21139
This commit is contained in:
parent
d4bbc72b1b
commit
85f95e86b7
@ -137,6 +137,16 @@ if ($action == 'swapstatut' && $user->rights->ticket->write) {
|
|||||||
// Efface un contact
|
// Efface un contact
|
||||||
if ($action == 'deletecontact' && $user->rights->ticket->write) {
|
if ($action == 'deletecontact' && $user->rights->ticket->write) {
|
||||||
if ($object->fetch($id, '', $track_id)) {
|
if ($object->fetch($id, '', $track_id)) {
|
||||||
|
$internal_contacts = $object->listeContact(-1, 'internal', 0, 'SUPPORTTEC');
|
||||||
|
foreach ($internal_contacts as $key => $contact) {
|
||||||
|
if ($contact['rowid'] == $lineid && $object->fk_user_assign==$contact['id']) {
|
||||||
|
$ret = $object->assignUser($user, null);
|
||||||
|
if ($ret < 0) {
|
||||||
|
$error ++;
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$result = $object->delete_contact($lineid);
|
$result = $object->delete_contact($lineid);
|
||||||
|
|
||||||
if ($result >= 0) {
|
if ($result >= 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user