mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-20 01:25:56 +02:00
Fixed #18
This commit is contained in:
parent
fb19e13297
commit
0038e2a66a
1 changed files with 25 additions and 1 deletions
|
@ -94,6 +94,8 @@ class DomainsController extends Controller
|
|||
$contactBilling = $data['contactBilling'] ?? null;
|
||||
|
||||
$nameservers = !empty($data['nameserver']) ? $data['nameserver'] : null;
|
||||
$nameserver_ipv4 = !empty($data['nameserver_ipv4']) ? $data['nameserver_ipv4'] : null;
|
||||
$nameserver_ipv6 = !empty($data['nameserver_ipv6']) ? $data['nameserver_ipv6'] : null;
|
||||
|
||||
$dsKeyTag = $data['dsKeyTag'] ?? null;
|
||||
$dsAlg = $data['dsAlg'] ?? null;
|
||||
|
@ -221,6 +223,12 @@ class DomainsController extends Controller
|
|||
$nameservers = array_filter($data['nameserver'] ?? [], function($value) {
|
||||
return !empty($value) && $value !== null;
|
||||
});
|
||||
$nameserver_ipv4 = array_filter($data['nameserver_ipv4'] ?? [], function($value) {
|
||||
return !empty($value) && $value !== null;
|
||||
});
|
||||
$nameserver_ipv6 = array_filter($data['nameserver_ipv6'] ?? [], function($value) {
|
||||
return !empty($value) && $value !== null;
|
||||
});
|
||||
|
||||
if (!empty($nameservers)) {
|
||||
if (count($nameservers) !== count(array_unique($nameservers))) {
|
||||
|
@ -630,6 +638,14 @@ class DomainsController extends Controller
|
|||
]
|
||||
);
|
||||
|
||||
$db->insert(
|
||||
'host_status',
|
||||
[
|
||||
'status' => 'ok',
|
||||
'host_id' => $host_id
|
||||
]
|
||||
);
|
||||
|
||||
if (isset($nameserver_ipv4[$index]) && !empty($nameserver_ipv4[$index])) {
|
||||
$ipv4 = normalize_v4_address($nameserver_ipv4[$index]);
|
||||
|
||||
|
@ -1241,6 +1257,14 @@ class DomainsController extends Controller
|
|||
]
|
||||
);
|
||||
|
||||
$db->insert(
|
||||
'host_status',
|
||||
[
|
||||
'status' => 'ok',
|
||||
'host_id' => $host_id
|
||||
]
|
||||
);
|
||||
|
||||
if (isset($nameserver_ipv4[$index]) && !empty($nameserver_ipv4[$index])) {
|
||||
$ipv4 = normalize_v4_address($nameserver_ipv4[$index]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue