summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-12-08 12:29:55 -0200
committerRenato Botelho <renato@netgate.com>2015-12-08 12:29:55 -0200
commitb37adaed58f5bab4f8269be0c291c933b26d90f9 (patch)
treefbbd8c1f8de16c00edd409b7330bbe1c646fa909
parentaf83299d085a900e75e4d6de9d5fe65de6bd251a (diff)
parent83b9d03e228829e18be09e85d9a83faaa2df5858 (diff)
downloadpfsense-b37adaed58f5bab4f8269be0c291c933b26d90f9.zip
pfsense-b37adaed58f5bab4f8269be0c291c933b26d90f9.tar.gz
Merge pull request #2186 from phil-davis/patch-2
-rw-r--r--src/usr/local/www/services_ntpd.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/local/www/services_ntpd.php b/src/usr/local/www/services_ntpd.php
index 6e6413f..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} ";
@@ -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