From abe98adb911f9ff76af12034646a4c64e26d6390 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Tue, 15 Dec 2015 10:38:12 +0545 Subject: Code style status* --- src/usr/local/www/status_dhcpv6_leases.php | 41 +++++++++++++++++------------- 1 file changed, 24 insertions(+), 17 deletions(-) (limited to 'src/usr/local/www/status_dhcpv6_leases.php') diff --git a/src/usr/local/www/status_dhcpv6_leases.php b/src/usr/local/www/status_dhcpv6_leases.php index 9620679..cb7a2ea 100644 --- a/src/usr/local/www/status_dhcpv6_leases.php +++ b/src/usr/local/www/status_dhcpv6_leases.php @@ -332,11 +332,11 @@ while ($i < $leases_count) { $f = $f+2; break; case "client-hostname": - if($data[$f+1] != "") { - $entry['hostname'] = preg_replace('/"/','',$data[$f+1]); + if ($data[$f+1] != "") { + $entry['hostname'] = preg_replace('/"/', '', $data[$f+1]); } else { $hostname = gethostbyaddr($entry['ip']); - if($hostname != "") { + if ($hostname != "") { $entry['hostname'] = $hostname; } } @@ -433,8 +433,9 @@ if (count($pools) > 0) { /* only print pool status when we have one */ } -if (empty($leases)) +if (empty($leases)) { print ''; +} ?>
@@ -458,19 +459,21 @@ if (empty($leases)) $dhcpifconf) { - if(is_array($dhcpifconf['staticmap'])) { + if (is_array($dhcpifconf['staticmap'])) { foreach ($dhcpifconf['staticmap'] as $staticent) { if ($data['ip'] == $staticent['ipaddr']) { $data['if'] = $dhcpif; @@ -479,8 +482,9 @@ foreach ($leases as $data): } } /* exit as soon as we have an interface */ - if ($data['if'] != "") + if ($data['if'] != "") { break; + } } } else { $data['if'] = convert_real_interface_to_friendly_interface_name(guess_interface_from_ip($data['ip'])); @@ -497,7 +501,7 @@ foreach ($leases as $data): - + () @@ -544,19 +548,21 @@ foreach ($leases as $data): $dhcpifconf) { - if(is_array($dhcpifconf['staticmap'])) { + if (is_array($dhcpifconf['staticmap'])) { foreach ($dhcpifconf['staticmap'] as $staticent) { if ($data['ip'] == $staticent['ipaddr']) { $data['if'] = $dhcpif; @@ -565,8 +571,9 @@ foreach ($prefixes as $data): } } /* exit as soon as we have an interface */ - if ($data['if'] != "") + if ($data['if'] != "") { break; + } } } else { $data['if'] = convert_real_interface_to_friendly_interface_name(guess_interface_from_ip($data['ip'])); -- cgit v1.1