From 43444ecd21690f6bc78ce6c881658b388e7e7fc7 Mon Sep 17 00:00:00 2001 From: heper Date: Mon, 2 Nov 2015 16:51:11 +0100 Subject: convert interfaces_vlan to fa this page used $_POST instead on $_GET. no clue why. changed it to $_GET like every other page i've come across thus far. (it only seems to complicate things, without an actual benefit??) --- src/usr/local/www/interfaces_vlan.php | 58 +++++++++++++---------------------- 1 file changed, 21 insertions(+), 37 deletions(-) (limited to 'src/usr/local/www/interfaces_vlan.php') diff --git a/src/usr/local/www/interfaces_vlan.php b/src/usr/local/www/interfaces_vlan.php index bdd7898..4d01bd1 100644 --- a/src/usr/local/www/interfaces_vlan.php +++ b/src/usr/local/www/interfaces_vlan.php @@ -88,19 +88,19 @@ function vlan_inuse($num) { return false; } -if ($_POST['act'] == "del") { - if (!isset($_POST['id'])) { +if ($_GET['act'] == "del") { + if (!isset($_GET['id'])) { $input_errors[] = gettext("Wrong parameters supplied"); - } else if (empty($a_vlans[$_POST['id']])) { + } else if (empty($a_vlans[$_GET['id']])) { $input_errors[] = gettext("Wrong index supplied"); /* check if still in use */ - } else if (vlan_inuse($_POST['id'])) { + } else if (vlan_inuse($_GET['id'])) { $input_errors[] = gettext("This VLAN cannot be deleted because it is still being used as an interface."); } else { - if (does_interface_exist($a_vlans[$_POST['id']]['vlanif'])) { - pfSense_interface_destroy($a_vlans[$_POST['id']]['vlanif']); + if (does_interface_exist($a_vlans[$_GET['id']]['vlanif'])) { + pfSense_interface_destroy($a_vlans[$_GET['id']]['vlanif']); } - unset($a_vlans[$_POST['id']]); + unset($a_vlans[$_GET['id']]); write_config(); @@ -134,17 +134,15 @@ print_info_box(sprintf(gettext('NOTE: Not all drivers/NICs support 802.1Q '. 'tagging will still work, but the reduced MTU may cause problems.
See the '. '%s handbook for information on supported cards.'),$g['product_name'])); ?> -
- - - -
- +
+
+ + + + ')"> - -
- - -
- -
-
- - + + + +