From 1fe07ba84e9ff5c3194b7dd0c296bde458bff052 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Mon, 21 Sep 2015 20:14:17 -0500 Subject: services_ntpd.php - style fixes, fix typo --- src/usr/local/www/services_ntpd.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/services_ntpd.php b/src/usr/local/www/services_ntpd.php index 518b568..a16a010 100644 --- a/src/usr/local/www/services_ntpd.php +++ b/src/usr/local/www/services_ntpd.php @@ -214,25 +214,28 @@ function build_interface_list() { $interfaces = get_configured_interface_with_descr(); $carplist = get_configured_carp_interface_list(); - foreach ($carplist as $cif => $carpip) + foreach ($carplist as $cif => $carpip) { $interfaces[$cif] = $carpip . " (" . get_vip_descr($carpip) .")"; + } $aliaslist = get_configured_ip_aliases_list(); - foreach ($aliaslist as $aliasip => $aliasif) + foreach ($aliaslist as $aliasip => $aliasif) { $interfaces[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")"; + } $size = (count($interfaces) < 10) ? count($interfaces) : 10; foreach ($interfaces as $iface => $ifacename) { - if (!is_ipaddr(get_interface_ip($iface)) && !is_ipaddr($iface)) + if (!is_ipaddr(get_interface_ip($iface)) && !is_ipaddr($iface)) { continue; + } $iflist['options']['$iface'] = $ifacename; - if (in_array($iface, $pconfig['interface'])) - array_push($iflist['slected'], $iface); - + if (in_array($iface, $pconfig['interface'])) { + array_push($iflist['selected'], $iface); + } } return($iflist); @@ -281,7 +284,7 @@ $section->addInput(new Form_Select( // NUMTIMESERVERS time servers are always available, but we only display a smaller number of these ($maxrows) // Clicking the 'Add Row' button increments $maxrows so you can see more of time servers $timeservers = explode( ' ', $config['system']['timeservers']); -for ($i = $j = 0; $i < NUMTIMESERVERS; $i++){ +for ($i = $j = 0; $i < NUMTIMESERVERS; $i++) { if($i >= $maxrows) continue; @@ -322,8 +325,9 @@ if($maxrows < NUMTIMESERVERS) { ); $btnaddrow->removeClass('btn-primary')->addClass('btn-success btn-sm'); -} else +} else { $btnaddrow = false; +} $section->addInput(new Form_StaticText( null, -- cgit v1.1