summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_ntpd.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/local/www/services_ntpd.php')
-rw-r--r--src/usr/local/www/services_ntpd.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/usr/local/www/services_ntpd.php b/src/usr/local/www/services_ntpd.php
index 3340bdf..8803d79 100644
--- a/src/usr/local/www/services_ntpd.php
+++ b/src/usr/local/www/services_ntpd.php
@@ -107,7 +107,7 @@ if ($_POST) {
unset($config['ntpd']['noselect']);
$timeservers = '';
- for ($i = 0; $i < 10; $i++) {
+ for ($i = 0; $i < NUMTIMESERVERS; $i++) {
$tserver = trim($_POST["server{$i}"]);
if (!empty($tserver)) {
$timeservers .= "{$tserver} ";
@@ -268,7 +268,7 @@ if (empty($pconfig['interface'])) {
} else {
$pconfig['interface'] = explode(",", $pconfig['interface']);
}
-$pgtitle = array(gettext("Services"), gettext("NTP"));
+$pgtitle = array(gettext("Services"), gettext("NTP"), gettext("NTP"));
$shortcut_section = "ntp";
include("head.inc");
@@ -299,8 +299,8 @@ $section->addInput(new Form_Select(
'Selecting no interfaces will listen on all interfaces with a wildcard.' . '<br />' .
'Selecting all interfaces will explicitly listen on only the interfaces/IPs specified.');
-$maxrows = 3;
$timeservers = explode( ' ', $config['system']['timeservers']);
+$maxrows = max(count($timeservers), 1);
for ($counter=0; $counter < $maxrows; $counter++) {
$group = new Form_Group($counter == 0 ? 'Time servers':'');
$group->addClass('repeatable');
OpenPOWER on IntegriCloud