mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-22 02:25:59 +02:00
Fixed whois and rdap status display
This commit is contained in:
parent
8dcbaed649
commit
c5cb152f6e
2 changed files with 34 additions and 0 deletions
|
@ -350,6 +350,16 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c, $log) {
|
|||
$stmt2->execute();
|
||||
$statuses = $stmt2->fetchAll(PDO::FETCH_COLUMN, 0);
|
||||
|
||||
// Add rgpstatus to statuses if it's not empty
|
||||
if (!empty($domainDetails['rgpstatus'])) {
|
||||
$statuses[] = $domainDetails['rgpstatus'];
|
||||
}
|
||||
|
||||
// If statuses array is empty, add 'ok' to it
|
||||
if (empty($statuses)) {
|
||||
$statuses[] = 'ok';
|
||||
}
|
||||
|
||||
// Query: Get DNSSEC details
|
||||
$stmt2a = $pdo->prepare("SELECT interface FROM secdns WHERE domain_id = :domain_id");
|
||||
$stmt2a->bindParam(':domain_id', $domainDetails['id'], PDO::PARAM_INT);
|
||||
|
@ -1570,6 +1580,16 @@ function handleDomainSearchQuery($request, $response, $pdo, $searchPattern, $c,
|
|||
$stmt2->execute();
|
||||
$statuses = $stmt2->fetchAll(PDO::FETCH_COLUMN, 0);
|
||||
|
||||
// Add rgpstatus to statuses if it's not empty
|
||||
if (!empty($domainDetails['rgpstatus'])) {
|
||||
$statuses[] = $domainDetails['rgpstatus'];
|
||||
}
|
||||
|
||||
// If statuses array is empty, add 'ok' to it
|
||||
if (empty($statuses)) {
|
||||
$statuses[] = 'ok';
|
||||
}
|
||||
|
||||
// Query: Get DNSSEC details
|
||||
$stmt2a = $pdo->prepare("SELECT interface FROM secdns WHERE domain_id = :domain_id");
|
||||
$stmt2a->bindParam(':domain_id', $domainDetails['id'], PDO::PARAM_INT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue