diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-03-01 01:23:50 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-03-01 01:23:50 +0000 |
commit | 2e7efb95bfc986a43facbf58080e441a952e33c3 (patch) | |
tree | 946f7ddb671e2f8f6d006284c55a56a0acc1507d | |
parent | 8e6ac824781ac78e0867959b21b0b8ed896a6eee (diff) | |
download | pfsense-2e7efb95bfc986a43facbf58080e441a952e33c3.zip pfsense-2e7efb95bfc986a43facbf58080e441a952e33c3.tar.gz |
Fix validation during the wizard.
-rw-r--r-- | usr/local/www/wizards/traffic_shaper_wizard.inc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/usr/local/www/wizards/traffic_shaper_wizard.inc b/usr/local/www/wizards/traffic_shaper_wizard.inc index 7c48a63..6863a9e 100644 --- a/usr/local/www/wizards/traffic_shaper_wizard.inc +++ b/usr/local/www/wizards/traffic_shaper_wizard.inc @@ -405,12 +405,12 @@ function step2_stepsubmitphpaction() { ={$message}"); exit; } - if ($upbw < 128 && $_POST["conn{$i}uploadscheduler"] == "Kb" && trim($_POST["downloadscheduler"]) == "CBQ") { + if ($upbw < 128 && $_POST["conn{$i}uploadspeed"] == "Kb" && trim($_POST["conn{$i}scheduler"]) == "CBQ") { $message=gettext("We do not support Bandwidths smaller than 128Kbit/s for CBQ scheduler."); header("Location: wizard.php?xml=traffic_shaper_wizard.xml&stepid=1&message={$message}"); exit; } - if ($downbw < 128 && $_POST["conn{$i}downloadscheduler"] == "Kb" && trim($_POST["downloadscheduler"]) == "CBQ") { + if ($downbw < 128 && $_POST["conn{$i}downloadspeed"] == "Kb" && trim($_POST["downloadscheduler"]) == "CBQ") { $message=gettext("We do not support Bandwidths smaller than 128Kbit/s for CBQ scheduler."); header("Location: wizard.php?xml=traffic_shaper_wizard.xml&stepid=1&message={$message}"); exit; @@ -494,10 +494,9 @@ function step4_stepsubmitphpaction() { } function step5_stepsubmitphpaction() { - global $config; if ( $_POST['enable'] ) { - if (isset($_POST['bandwidth'])) { + if (isset($_POST['bandwidth']) && $_POST['bandwidth'] <> "") { if(!is_numeric($_POST['bandwidth'])) { $message="Posted value is not a valid bandwidth."; header("Location: wizard.php?xml=traffic_shaper_wizard.xml&stepid=4&message={$message}"); @@ -516,13 +515,7 @@ function step5_stepsubmitphpaction() { exit; } */ - } else { - if(!$_POST['bandwidth']) { - $message="You need to specify a value for bandwidth! Values should be in percentage."; - header("Location: wizard.php?xml=traffic_shaper_wizard.xml&stepid=4&message={$message}"); - - } - } + } } } |