diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-07-30 22:01:09 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-07-30 22:01:09 -0400 |
commit | 3a6dc29410abc3b1899d6806a5dfe54cb72b11d4 (patch) | |
tree | deb643e014bfef04334ed2acdd52b08e1e1c069d /usr/local/www | |
parent | e1f6a0d9087a9d6cd0ef4d836f75430915bc964a (diff) | |
download | pfsense-3a6dc29410abc3b1899d6806a5dfe54cb72b11d4.zip pfsense-3a6dc29410abc3b1899d6806a5dfe54cb72b11d4.tar.gz |
Do not prompt to create an alias for items that cannot be resolved
Diffstat (limited to 'usr/local/www')
-rw-r--r-- | usr/local/www/diag_dns.php | 22 |
1 files changed, 14 insertions, 8 deletions
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 ($resolved && $type) { ?> = <font size="+1"> <?php + $found = 0; if(is_array($resolved)) { foreach($resolved as $hostitem) { - echo $hostitem . "<br/>"; + if($hostitem <> "") { + echo $hostitem . "<br/>"; + $found++; + } } } else { echo $resolved; } - if($alias_exists) { - echo "An alias already exists for the hostname {$newalias['name']}. To overwrite, click <a href='diag_dns.php?host=" . trim(urlencode($host)) . "&createalias=true&override=true'>here</a>."; - } else { - if(!$createdalias) { - echo "<a href='diag_dns.php?host=" . trim(urlencode($host)) . "&createalias=true'>Create alias</a> out of these entries."; - } else { - echo "Alias created with name {$newalias['name']}"; + if($found > 0) { + if($alias_exists) { + echo "<br/>An alias already exists for the hostname {$newalias['name']}. To overwrite, click <a href='diag_dns.php?host=" . trim(urlencode($host)) . "&createalias=true&override=true'>here</a>."; + } else { + if(!$createdalias) { + echo "<br/><a href='diag_dns.php?host=" . trim(urlencode($host)) . "&createalias=true'>Create alias</a> out of these entries."; + } else { + echo "<br/>Alias created with name {$newalias['name']}"; + } } } ?> |