Commit 4f5144f9 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) regression services_dhcp.php

parent 3ccabbaa
......@@ -180,7 +180,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
}
// handle booleans
$pconfig['enable'] = isset($dhcpdconf['enabled']);
$pconfig['enable'] = isset($dhcpdconf['enable']);
$pconfig['staticarp'] = isset($dhcpdconf['staticarp']);
$pconfig['denyunknown'] = isset($dhcpdconf['denyunknown']);
$pconfig['ddnsupdate'] = isset($dhcpdconf['ddnsupdate']);
......@@ -198,7 +198,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['dns2'] = !empty($dhcpdconf['dnsserver'][1]) ? $dhcpdconf['dnsserver'][1] : "";
$pconfig['ntp1'] = !empty($dhcpdconf['ntpserver'][0]) ? $dhcpdconf['winsserver'][0] : "";
$pconfig['ntp2'] = !empty($dhcpdconf['ntpserver'][1]) ? $dhcpdconf['ntpserver'][1] : "";
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
// handle identifiers and actions
if (!empty($_POST['if']) && !empty($config['interfaces'][$_POST['if']])) {
......@@ -229,12 +228,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (isset($pconfig['numberoptions_number'])) {
$pconfig['numberoptions']['item'] = array();
foreach ($pconfig['numberoptions_number'] as $opt_seq => $opt_number) {
if (!empty($opt_number)) {
$pconfig['numberoptions']['item'][] = array('number' => $opt_number,
'type' => $pconfig['numberoptions_type'][$opt_seq],
'value' => $pconfig['numberoptions_value'][$opt_seq]
);
}
}
}
/* input validation */
$reqdfields = explode(" ", "range_from range_to");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment