From 30ef6f8dd093a6ff7c9f3e2533297903ed2d1ec3 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 9 Feb 2011 22:06:19 +0000 Subject: Allow renaming even shaper queues as an improvement. --- etc/inc/shaper.inc | 13 ++++++++++--- 1 file 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 .= ""; $form .= ""; $form .= "Queue Name"; - $form .= "GetQname()); + $form .= "\">"; + $form .= "GetQname()); $form .= "\">"; $form .= "
Enter the name of the queue here. Do not use spaces and limit the size to 15 characters."; -- cgit v1.1