Skip to content

Commit

Permalink
Fix the CheckAvailability logic for .za domains.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkinnes committed Mar 8, 2022
1 parent fda87cc commit 5e58fc9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dns_gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,11 @@ function dns_gateway_CheckAvailability($params)

$domain_check = $api->domain_check($domain_info);

// Simplify logic below with za's wierd reasons
if ($domain_check['results'][0]['reason'] == 'In Use') {
$domain_check['results'][0]['reason'] == 'Domain exists';
}

// Determine the appropriate status to return
if ($domain_check['results'][0]['avail'] == '1') {
$status = SearchResult::STATUS_NOT_REGISTERED;
Expand Down

0 comments on commit 5e58fc9

Please sign in to comment.