From 4f7fb8a69e8a88f1085371f050912b8fefdc0e44 Mon Sep 17 00:00:00 2001 From: heper Date: Mon, 2 Nov 2015 18:00:52 +0100 Subject: revert back to $_POST after request from Steve_B note: onclick="return confirm" does not function as expected. vlan still removed when choosing "cancel" --- src/usr/local/www/interfaces_vlan.php | 70 ++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 26 deletions(-) (limited to 'src') diff --git a/src/usr/local/www/interfaces_vlan.php b/src/usr/local/www/interfaces_vlan.php index 4d01bd1..9c6c197 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 ($_GET['act'] == "del") { - if (!isset($_GET['id'])) { +if ($_POST['act'] == "del") { + if (!isset($_POST['id'])) { $input_errors[] = gettext("Wrong parameters supplied"); - } else if (empty($a_vlans[$_GET['id']])) { + } else if (empty($a_vlans[$_POST['id']])) { $input_errors[] = gettext("Wrong index supplied"); /* check if still in use */ - } else if (vlan_inuse($_GET['id'])) { + } else if (vlan_inuse($_POST['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[$_GET['id']]['vlanif'])) { - pfSense_interface_destroy($a_vlans[$_GET['id']]['vlanif']); + if (does_interface_exist($a_vlans[$_POST['id']]['vlanif'])) { + pfSense_interface_destroy($a_vlans[$_POST['id']]['vlanif']); } - unset($a_vlans[$_GET['id']]); + unset($a_vlans[$_POST['id']]); write_config(); @@ -134,15 +134,19 @@ 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'])); ?> -
- - - - - - - - + + + + +
+
+ + + + + + + - -
- - ')"> + + + ')">
- -
- + + + + + +