From 873a236bfe372aa4df726929afa932e989a0898f Mon Sep 17 00:00:00 2001 From: NOYB Date: Mon, 16 Jan 2017 13:50:53 -0800 Subject: Status / Interfaces - Match Var Names Match Form Input and Function Parameter Names with associated Var Name. Use "ifdescr" as form input name instead of "if" since "ifsescr" is the var being passed. Use "ifdescr" as showDefBtn function var instead of "ifval" since "ifsescr" is the var being passed. Avoid confusion with $info['if']. --- src/usr/local/www/status_interfaces.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/usr/local/www/status_interfaces.php b/src/usr/local/www/status_interfaces.php index 3b49995..ae589b9 100644 --- a/src/usr/local/www/status_interfaces.php +++ b/src/usr/local/www/status_interfaces.php @@ -66,8 +66,8 @@ require_once("guiconfig.inc"); require_once("shaper.inc"); require_once("filter.inc"); -if ($_POST['if'] && $_POST['submit']) { - $interface = $_POST['if']; +if ($_POST['ifdescr'] && $_POST['submit']) { + $interface = $_POST['ifdescr']; if ($_POST['status'] == "up") { interface_bring_down($interface); } else { @@ -78,7 +78,7 @@ if ($_POST['if'] && $_POST['submit']) { } $formtemplate = '
' . - '' . + '' . '' . '%s' . '