Skip to content

Commit

Permalink
Allow multiple valid time servers to be entered in the wizard, as the…
Browse files Browse the repository at this point in the history
…y are allowed under System > General
  • Loading branch information
jim-p committed Sep 24, 2013
1 parent c7d4886 commit 49e60fa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions usr/local/www/wizards/setup_wizard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@
<description>Enter the hostname (FQDN) of the time server.</description>
<type>input</type>
<bindstofield>system->timeservers</bindstofield>
<validate>^[a-z0-9.|-]+$</validate>
<message>Invalid Time Server Field</message>
</field>
<field>
<name>Timezone</name>
Expand All @@ -153,9 +151,11 @@
</fields>
<stepsubmitphpaction>
<![CDATA[
if(!empty($_POST['timeserverhostname']) && !(is_hostname($_POST['timeserverhostname']) || is_ipaddr($_POST['timeserverhostname']))) {
print_info_box_np("Invalid Time Server. Please press back in your browser window and correct.");
die;
foreach (explode(' ', $_POST['timeserverhostname']) as $ts) {
if (!is_domain($ts)) {
print_info_box_np(gettext("NTP Time Server names may only contain the characters a-z, 0-9, '-' and '.'. Entries may be separated by spaces. Please press back in your browser window and correct."));
die;
}
}
]]>
</stepsubmitphpaction>
Expand Down

0 comments on commit 49e60fa

Please sign in to comment.