Fixed whois and rdap status display

This commit is contained in:
Pinga 2023-12-13 06:17:56 +02:00
parent 8dcbaed649
commit c5cb152f6e
2 changed files with 34 additions and 0 deletions

View file

@ -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);