diff options
author | Ermal <eri@pfsense.org> | 2011-02-09 22:06:19 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-02-09 22:06:37 +0000 |
commit | 30ef6f8dd093a6ff7c9f3e2533297903ed2d1ec3 (patch) | |
tree | bf02799ac75b7ab5a782d00a383e87096ad2438a /etc | |
parent | 50124de105a33c34a15364c4c4be3971426e66af (diff) | |
download | pfsense-30ef6f8dd093a6ff7c9f3e2533297903ed2d1ec3.zip pfsense-30ef6f8dd093a6ff7c9f3e2533297903ed2d1ec3.tar.gz |
Allow renaming even shaper queues as an improvement.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/shaper.inc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc index 6734f80..7e77502 100644 --- a/etc/inc/shaper.inc +++ b/etc/inc/shaper.inc @@ -967,8 +967,12 @@ class priq_queue { } function ReadConfig(&$q) { - if (isset($q['name'])) - $this->SetQname($q['name']); + if (!empty($q['name']) && !empty($q['newname']) && $q['name'] != $q['newname']) { + $this->SetQname($q['newname']); + } else if (!empty($q['newname'])) { + $this->SetQname($q['newname']); + } else if (isset($q['name'])) + $this->SetQname($q['name']); if (isset($q['interface'])) $this->SetInterface($q['interface']); $this->SetBandwidth($q['bandwidth']); @@ -1100,7 +1104,10 @@ class priq_queue { $form .= "<tr>"; $form .= "<td width=\"22%\" valign=\"center\" class=\"vncellreq\">"; $form .= "Queue Name</td><td width=\"78%\" class=\"vtable\">"; - $form .= "<input name=\"name\" type=\"text\" id=\"name\" class=\"formfld unknown\" size=\"15\" maxlength=\"15\" value=\""; + $form .= "<input name=\"newname\" type=\"text\" id=\"newname\" class=\"formfld unknown\" size=\"15\" maxlength=\"15\" value=\""; + $form .= htmlspecialchars($this->GetQname()); + $form .= "\">"; + $form .= "<input name=\"name\" type=\"hidden\" id=\"name\" class=\"formfld unknown\" size=\"15\" maxlength=\"15\" value=\""; $form .= htmlspecialchars($this->GetQname()); $form .= "\">"; $form .= "<br /> <span class=\"vexpl\">Enter the name of the queue here. Do not use spaces and limit the size to 15 characters."; |