mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix reading of server list on page load
This commit is contained in:
parent
5ab32eac07
commit
d54d028f63
@ -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) {
|
||||
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user