diff options
author | Steve Beaver <sbeaver@netgate.com> | 2017-02-14 14:42:13 -0500 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2017-02-14 14:42:13 -0500 |
commit | 13541a81e1173fc02af9af8ab7fe46df2a51007d (patch) | |
tree | c87a8d90338bfb1e2c245b58e77cca67b70c8c60 /src/usr/local/www/services_dnsmasq_edit.php | |
parent | c946d7217bff529d246084f9b83212ad0ab730a3 (diff) | |
download | pfsense-13541a81e1173fc02af9af8ab7fe46df2a51007d.zip pfsense-13541a81e1173fc02af9af8ab7fe46df2a51007d.tar.gz |
GET/POST conversions
Diffstat (limited to 'src/usr/local/www/services_dnsmasq_edit.php')
-rw-r--r-- | src/usr/local/www/services_dnsmasq_edit.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/usr/local/www/services_dnsmasq_edit.php b/src/usr/local/www/services_dnsmasq_edit.php index d6b58b2..b476052 100644 --- a/src/usr/local/www/services_dnsmasq_edit.php +++ b/src/usr/local/www/services_dnsmasq_edit.php @@ -39,13 +39,11 @@ if (!is_array($config['dnsmasq']['hosts'])) { $a_hosts = &$config['dnsmasq']['hosts']; -if (is_numericint($_GET['id'])) { - $id = $_GET['id']; -} -if (isset($_POST['id']) && is_numericint($_POST['id'])) { - $id = $_POST['id']; +if (is_numericint($_REQUEST['id'])) { + $id = $_REQUEST['id']; } + if (isset($id) && $a_hosts[$id]) { $pconfig['host'] = $a_hosts[$id]['host']; $pconfig['domain'] = $a_hosts[$id]['domain']; @@ -54,7 +52,7 @@ if (isset($id) && $a_hosts[$id]) { $pconfig['aliases'] = $a_hosts[$id]['aliases']; } -if ($_POST) { +if ($_POST['save']) { unset($input_errors); $pconfig = $_POST; @@ -165,8 +163,8 @@ if ($_POST) { } // Delete a row in the options table -if ($_GET['act'] == "delopt") { - $idx = $_GET['id']; +if ($_POST['act'] == "delopt") { + $idx = $_POST['id']; if ($pconfig['aliases'] && is_array($pconfig['aliases']['item'][$idx])) { unset($pconfig['aliases']['item'][$idx]); @@ -174,7 +172,7 @@ if ($_GET['act'] == "delopt") { } // Add an option row -if ($_GET['act'] == "addopt") { +if ($_REQUEST['act'] == "addopt") { if (!is_array($pconfig['aliases']['item'])) { $pconfig['aliases']['item'] = array(); } |