Merge pull request #210 from timdufrane/patch-1

Shorthost should return full IP addresses
This commit is contained in:
Paul Gear
2014-03-29 08:42:14 +10:00
+4
View File
@@ -32,6 +32,10 @@ function external_exec($command)
function shorthost($hostname, $len=12)
{
// IP addresses should not be shortened
if (filter_var($hostname, FILTER_VALIDATE_IP))
return $hostname;
$parts = explode(".", $hostname);
$shorthost = $parts[0];
$i = 1;