summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_wol_edit.php
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2017-02-14 14:42:13 -0500
committerSteve Beaver <sbeaver@netgate.com>2017-02-14 14:42:13 -0500
commit13541a81e1173fc02af9af8ab7fe46df2a51007d (patch)
treec87a8d90338bfb1e2c245b58e77cca67b70c8c60 /src/usr/local/www/services_wol_edit.php
parentc946d7217bff529d246084f9b83212ad0ab730a3 (diff)
downloadpfsense-13541a81e1173fc02af9af8ab7fe46df2a51007d.zip
pfsense-13541a81e1173fc02af9af8ab7fe46df2a51007d.tar.gz
GET/POST conversions
Diffstat (limited to 'src/usr/local/www/services_wol_edit.php')
-rw-r--r--src/usr/local/www/services_wol_edit.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/usr/local/www/services_wol_edit.php b/src/usr/local/www/services_wol_edit.php
index 17b192f..fe4011c 100644
--- a/src/usr/local/www/services_wol_edit.php
+++ b/src/usr/local/www/services_wol_edit.php
@@ -41,33 +41,35 @@ function wol_sort() {
}
require_once("guiconfig.inc");
+
if (!is_array($config['wol']['wolentry'])) {
$config['wol']['wolentry'] = array();
}
+
$a_wol = &$config['wol']['wolentry'];
-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_wol[$id]) {
$pconfig['interface'] = $a_wol[$id]['interface'];
$pconfig['mac'] = $a_wol[$id]['mac'];
$pconfig['descr'] = $a_wol[$id]['descr'];
} else {
- $pconfig['interface'] = $_GET['if'];
- $pconfig['mac'] = $_GET['mac'];
- $pconfig['descr'] = $_GET['descr'];
+ $pconfig['interface'] = $_REQUEST['if'];
+ $pconfig['mac'] = $_REQUEST['mac'];
+ $pconfig['descr'] = $_REQUEST['descr'];
}
-if ($_POST) {
+if ($_POST['save']) {
unset($input_errors);
$pconfig = $_POST;
+
+ )
/* input validation */
$reqdfields = explode(" ", "interface mac");
$reqdfieldsn = array(gettext("Interface"), gettext("MAC address"));
OpenPOWER on IntegriCloud