From 3a6dc29410abc3b1899d6806a5dfe54cb72b11d4 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 30 Jul 2010 22:01:09 -0400 Subject: Do not prompt to create an alias for items that cannot be resolved --- usr/local/www/diag_dns.php | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/diag_dns.php b/usr/local/www/diag_dns.php index 9810f3e..d001e1b 100644 --- a/usr/local/www/diag_dns.php +++ b/usr/local/www/diag_dns.php @@ -167,20 +167,26 @@ include("head.inc"); ?> = "; + if($hostitem <> "") { + echo $hostitem . "
"; + $found++; + } } } else { echo $resolved; } - if($alias_exists) { - echo "An alias already exists for the hostname {$newalias['name']}. To overwrite, click here."; - } else { - if(!$createdalias) { - echo "Create alias out of these entries."; - } else { - echo "Alias created with name {$newalias['name']}"; + if($found > 0) { + if($alias_exists) { + echo "
An alias already exists for the hostname {$newalias['name']}. To overwrite, click here."; + } else { + if(!$createdalias) { + echo "
Create alias out of these entries."; + } else { + echo "
Alias created with name {$newalias['name']}"; + } } } ?> -- cgit v1.1