This commit is contained in:
Pinga 2023-12-27 12:45:46 +02:00
parent 359441fa33
commit 9f3fbd5630

View file

@ -1538,6 +1538,7 @@ class DomainsController extends Controller
// Check if $contact_id is not null before update // Check if $contact_id is not null before update
if ($contact_id !== null) { if ($contact_id !== null) {
if ($contact_map_id !== null) {
$db->update( $db->update(
'domain_contact_map', 'domain_contact_map',
[ [
@ -1547,6 +1548,16 @@ class DomainsController extends Controller
'id' => $contact_map_id['id'] 'id' => $contact_map_id['id']
] ]
); );
} else {
$db->insert(
'domain_contact_map',
[
'contact_id' => $contact_id,
'domain_id' => $domain_id,
'type' => $type
]
);
}
} }
} }
} }