summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-03-31 17:45:37 +0000
committerErmal <eri@pfsense.org>2011-03-31 17:45:37 +0000
commit57c448d034577386e67bdbd918bef973e0bb65ec (patch)
treeacea3e335b8c17fe7337ffe1986d63249f31cbb8 /etc
parentd1bd01fffb9f6146af6b5305d450de52d91a9295 (diff)
downloadpfsense-57c448d034577386e67bdbd918bef973e0bb65ec.zip
pfsense-57c448d034577386e67bdbd918bef973e0bb65ec.tar.gz
Do not show the default queue selection for a queue that has child queues
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/shaper.inc18
1 files changed, 10 insertions, 8 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index 61c61ed..1bbf33c 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -742,7 +742,7 @@ class priq_queue {
var $available_bw; /* in b/s */
/* This is here to help with form building and building rules/lists */
- var $subqueues = array();
+ var $subqueues = array();
/* Accesor functions */
function GetAvailableBandwidth() {
@@ -1139,13 +1139,15 @@ class priq_queue {
$form .= "<tr>";
$form .= "<td width=\"22%\" valign=\"center\" class=\"vncell\">Scheduler options</td>";
$form .= "<td width=\"78%\" class=\"vtable\">";
- $tmpvalue = $this->GetDefault();
- if (!empty($tmpvalue)) {
- $form .= "<input type=\"checkbox\" id=\"default\" CHECKED name=\"default\" value=\"default\"";
- $form .= "> Default queue<br>";
- } else {
- $form .= "<input type=\"checkbox\" id=\"default\" name=\"default\" value=\"default\"";
- $form .= "> Default queue<br>";
+ if ($this->CanHaveChildren() && !empty($this->subqueues)) {
+ $tmpvalue = $this->GetDefault();
+ if (!empty($tmpvalue)) {
+ $form .= "<input type=\"checkbox\" id=\"default\" CHECKED name=\"default\" value=\"default\"";
+ $form .= "> Default queue<br>";
+ } else {
+ $form .= "<input type=\"checkbox\" id=\"default\" name=\"default\" value=\"default\"";
+ $form .= "> Default queue<br>";
+ }
}
$form .= "<input type=\"checkbox\" id=\"red\" name=\"red\" value=\"red\" ";
$tmpvalue = $this->GetRed();
OpenPOWER on IntegriCloud