mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-15 13:53:50 +02:00
Fixed #35
This commit is contained in:
parent
359441fa33
commit
9f3fbd5630
1 changed files with 20 additions and 9 deletions
|
@ -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
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue