diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-01-02 20:52:51 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-01-02 20:52:51 -0500 |
commit | d54d028f6344cea2c916f6d5f7d659dec288652a (patch) | |
tree | 6f55d0350cec55172ba714f31eb3f8cef62f1a59 | |
parent | 5ab32eac0795a18551b96ceb2de9e95ad04b1661 (diff) | |
download | pfsense-d54d028f6344cea2c916f6d5f7d659dec288652a.zip pfsense-d54d028f6344cea2c916f6d5f7d659dec288652a.tar.gz |
Fix reading of server list on page load
-rw-r--r-- | src/usr/local/www/services_dhcp_relay.php | 4 | ||||
-rw-r--r-- | src/usr/local/www/services_dhcpv6_relay.php | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/usr/local/www/services_dhcp_relay.php b/src/usr/local/www/services_dhcp_relay.php index ada2eae..2ddbd6e 100644 --- a/src/usr/local/www/services_dhcp_relay.php +++ b/src/usr/local/www/services_dhcp_relay.php @@ -149,6 +149,8 @@ if ($_POST) { } } +$pconfig['server'] = $config['dhcrelay']['server']; + $pgtitle = array(gettext("Services"), gettext("DHCP Relay")); $shortcut_section = "dhcp"; include("head.inc"); @@ -212,7 +214,7 @@ function createDestinationServerInputGroup($value = null) { return $group; } -if (!isset($pconfig['server']) || count($pconfig['server']) < 1) { +if (!isset($pconfig['server'])) { $section->add(createDestinationServerInputGroup()); } else { foreach (explode(',', $pconfig['server']) as $server) { diff --git a/src/usr/local/www/services_dhcpv6_relay.php b/src/usr/local/www/services_dhcpv6_relay.php index 62a4f5b..93ca9e9 100644 --- a/src/usr/local/www/services_dhcpv6_relay.php +++ b/src/usr/local/www/services_dhcpv6_relay.php @@ -147,6 +147,8 @@ if ($_POST) { } } +$pconfig['server'] = $config['dhcrelay6']['server']; + $pgtitle = array(gettext("Services"), gettext("DHCPv6 Relay")); $shortcut_section = "dhcp6"; include("head.inc"); @@ -211,11 +213,11 @@ function createDestinationServerInputGroup($value = null) { return $group; } -if (!isset($pconfig['server']) || count($pconfig['server']) < 1) { +if (!isset($pconfig['server'])) { $section->add(createDestinationServerInputGroup()); } else { - foreach ($pconfig['server'] as $server) { - $section->add(createDestinationServerInputGroup($server[0])); + foreach (explode(',', $pconfig['server']) as $server) { + $section->add(createDestinationServerInputGroup($server)); } } |