From df321263a43b79580662dbf0d71f7c81f3c3486f Mon Sep 17 00:00:00 2001 From: Joecowboy Date: Sat, 25 Feb 2012 19:06:08 -0600 Subject: need to break out of foreach loop once it finds there is a local time has been selected by any interface of DHCP. --- usr/local/www/status_dhcp_leases.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usr/local/www/status_dhcp_leases.php') diff --git a/usr/local/www/status_dhcp_leases.php b/usr/local/www/status_dhcp_leases.php index 5b65cc9..f1dec97 100755 --- a/usr/local/www/status_dhcp_leases.php +++ b/usr/local/www/status_dhcp_leases.php @@ -97,8 +97,11 @@ function leasecmp($a, $b) { function adjust_gmt($dt) { global $config; $dhcpd = $config['dhcpd']; - foreach ($dhcpd as $dhcpleaseinlocaltime) + foreach ($dhcpd as $dhcpleaseinlocaltime) { $dhcpleaseinlocaltime = $dhcpleaseinlocaltime['dhcpleaseinlocaltime']; + if ($dhcpleaseinlocaltime == "yes") + break; + } $timezone = $config['system']['timezone']; $ts = strtotime($dt . " GMT"); if ($dhcpleaseinlocaltime == "yes") { -- cgit v1.1