summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@su.local>2009-09-03 22:17:40 -0400
committerScott Ullrich <sullrich@su.local>2009-09-03 22:17:40 -0400
commit11a98a4aa673e9150b67b7e8c4674224e93070d1 (patch)
tree9f02c82a2d0cd142288d5a689b0a19e864ef06c0 /usr/local
parent71300e64e8e12eb5d178c519c4c41756d94cb8fc (diff)
downloadpfsense-11a98a4aa673e9150b67b7e8c4674224e93070d1.zip
pfsense-11a98a4aa673e9150b67b7e8c4674224e93070d1.tar.gz
Humans are not mathematicians by default so telling them interface 0 does not compute. Use +1
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/wizards/traffic_shaper_wizard.inc108
1 files changed, 55 insertions, 53 deletions
diff --git a/usr/local/www/wizards/traffic_shaper_wizard.inc b/usr/local/www/wizards/traffic_shaper_wizard.inc
index cd73fcc..c3d01df 100644
--- a/usr/local/www/wizards/traffic_shaper_wizard.inc
+++ b/usr/local/www/wizards/traffic_shaper_wizard.inc
@@ -342,38 +342,39 @@ function step3_stepbeforeformdisplay() {
$field['bindstofield'] = "ezshaper->step3->address";
$voipfields[] = $field;
- for ($i = 0; $i < $numberofconnections; $i++) {
- $field = array();
- $field['displayname'] = "Connection upload";
- $field['name'] = "conn{$i}upload";
- $field['type'] = "input";
- $field['bindstofield'] = "ezshaper->step3->conn{$i}upload";
- $field['combinefieldsbegin'] = "true";
- $voipfields[] = $field;
-
- $field = array();
- $field['combinefieldsend'] = "true";
- $field['dontdisplayname'] = "true";
- $field['dontcombinecells'] = "true";
- $field['name'] = "conn{$i}uploadspeed";
- $field['typehint'] = "Upload bandwidth guarantee for VOIP phone(s) on connection {$i}.";
- $field['type'] = "select";
- $field['options']['option'] = array();
- $opts = array();
- $opts['value'] = "Kb";
- $opts['name'] = "Kbit/s";
- $field['options']['option'][] = $opts;
- $opts = array();
- $opts['value'] = "Mb";
- $opts['name'] = "Mbit/s";
- $field['options']['option'][] = $opts;
- $opts = array();
- $opts['value'] = "Gb";
- $opts['name'] = "Gbit/s";
- $field['options']['option'][] = $opts;
- $field['bindstofield'] = "ezshaper->step3->conn{$i}uploadspeed";
- $voipfields[] = $field;
- }
+ for ($i = 0; $i < $numberofconnections; $i++) {
+ $field = array();
+ $field['displayname'] = "Connection upload";
+ $field['name'] = "conn{$i}upload";
+ $field['type'] = "input";
+ $field['bindstofield'] = "ezshaper->step3->conn{$i}upload";
+ $field['combinefieldsbegin'] = "true";
+ $voipfields[] = $field;
+
+ $field = array();
+ $field['combinefieldsend'] = "true";
+ $field['dontdisplayname'] = "true";
+ $field['dontcombinecells'] = "true";
+ $field['name'] = "conn{$i}uploadspeed";
+ $friendly_interface = $i+1;
+ $field['typehint'] = "Upload bandwidth guarantee for VOIP phone(s) on connection {$friendly_interface}.";
+ $field['type'] = "select";
+ $field['options']['option'] = array();
+ $opts = array();
+ $opts['value'] = "Kb";
+ $opts['name'] = "Kbit/s";
+ $field['options']['option'][] = $opts;
+ $opts = array();
+ $opts['value'] = "Mb";
+ $opts['name'] = "Mbit/s";
+ $field['options']['option'][] = $opts;
+ $opts = array();
+ $opts['value'] = "Gb";
+ $opts['name'] = "Gbit/s";
+ $field['options']['option'][] = $opts;
+ $field['bindstofield'] = "ezshaper->step3->conn{$i}uploadspeed";
+ $voipfields[] = $field;
+ }
$field = array();
$field['name'] = "download";
$field['type'] = "input";
@@ -382,27 +383,27 @@ function step3_stepbeforeformdisplay() {
$voipfields[] = $field;
$field = array();
- $field['combinefieldsend'] = "true";
- $field['dontdisplayname'] = "true";
- $field['dontcombinecells'] = "true";
- $field['name'] = "downloadspeed";
+ $field['combinefieldsend'] = "true";
+ $field['dontdisplayname'] = "true";
+ $field['dontcombinecells'] = "true";
+ $field['name'] = "downloadspeed";
$field['typehint'] = "Download bandwidth guarantee for VOIP phone(s) on connections.";
- $field['type'] = "select";
- $field['options']['option'] = array();
- $opts = array();
- $opts['value'] = "Kb";
- $opts['name'] = "Kbit/s";
- $field['options']['option'][] = $opts;
- $opts = array();
- $opts['value'] = "Mb";
- $opts['name'] = "Mbit/s";
- $field['options']['option'][] = $opts;
- $opts = array();
- $opts['value'] = "Gb";
- $opts['name'] = "Gbit/s";
- $field['options']['option'][] = $opts;
- $field['bindstofield'] = "ezshaper->step3->downloadspeed";
- $voipfields[] = $field;
+ $field['type'] = "select";
+ $field['options']['option'] = array();
+ $opts = array();
+ $opts['value'] = "Kb";
+ $opts['name'] = "Kbit/s";
+ $field['options']['option'][] = $opts;
+ $opts = array();
+ $opts['value'] = "Mb";
+ $opts['name'] = "Mbit/s";
+ $field['options']['option'][] = $opts;
+ $opts = array();
+ $opts['value'] = "Gb";
+ $opts['name'] = "Gbit/s";
+ $field['options']['option'][] = $opts;
+ $field['bindstofield'] = "ezshaper->step3->downloadspeed";
+ $voipfields[] = $field;
$field = array();
$field['name'] = "Next";
@@ -437,7 +438,8 @@ function step3_stepsubmitphpaction() {
$factor = wizard_get_bandwidthtype_scale($_POST["conn{$i}uploadspeed"]);
$input_bw = $factor * floatval($_POST["conn{$i}upload"]);
if ((0.8 * $ifbw) < $input_bw) {
- $message=gettext("You cannot set the VoIP upload bandwidth on connection {$i} higher than 80% of the connection.");
+ $friendly_interface = $i+1;
+ $message=gettext("You cannot set the VoIP upload bandwidth on connection {$friendly_interface} higher than 80% of the connection.");
header("Location: wizard.php?xml=traffic_shaper_wizard.xml&stepid=2&message={$message}");
exit;
}
OpenPOWER on IntegriCloud