summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-03-07 02:58:25 +0000
committerBill Marquette <billm@pfsense.org>2005-03-07 02:58:25 +0000
commite4ae3e09c31ed6a1ebed8881e59b12e615743c62 (patch)
treee59b7e367e9d6b58c1c5d8224d5da1303f33c2b8 /usr
parent54405438554942854843bc51fb255118e8c1bafc (diff)
downloadpfsense-e4ae3e09c31ed6a1ebed8881e59b12e615743c62.zip
pfsense-e4ae3e09c31ed6a1ebed8881e59b12e615743c62.tar.gz
Take queue names for edit
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_shaper_queues_edit.php56
1 files changed, 33 insertions, 23 deletions
diff --git a/usr/local/www/firewall_shaper_queues_edit.php b/usr/local/www/firewall_shaper_queues_edit.php
index 3de662b..024d9a7 100755
--- a/usr/local/www/firewall_shaper_queues_edit.php
+++ b/usr/local/www/firewall_shaper_queues_edit.php
@@ -44,29 +44,39 @@ $lan_sched = $config['interfaces']['lan']['schedulertype'];
$pconfig['schedulertype'] = $config['system']['schedulertype'];
$schedulertype = $config['system']['schedulertype'];
-if (isset($id) && $a_queues[$id]) {
- $pconfig['priority'] = $a_queues[$id]['priority'];
- $pconfig['mask'] = $a_queues[$id]['mask'];
- $pconfig['name'] = $a_queues[$id]['name'];
- $pconfig = $a_queues[$id];
- $pconfig['red'] = $a_queues[$id]['red'];
- $pconfig['ecn'] = $a_queues[$id]['ecn'];
- $pconfig['rio'] = $a_queues[$id]['rio'];
- $pconfig['borrow'] = $a_queues[$id]['borrow'];
- $pconfig['defaultqueue'] = $a_queues[$id]['defaultqueue'];
- $pconfig['parentqueue'] = $a_queues[$id]['parentqueue'];
- $pconfig['upperlimit1'] = $a_queues[$id]['upperlimit1'];
- $pconfig['upperlimit2'] = $a_queues[$id]['upperlimit2'];
- $pconfig['upperlimit3'] = $a_queues[$id]['upperlimit3'];
- $pconfig['realtime1'] = $a_queues[$id]['realtime1'];
- $pconfig['realtime2'] = $a_queues[$id]['realtime2'];
- $pconfig['realtime3'] = $a_queues[$id]['realtime3'];
- $pconfig['linkshare1'] = $a_queues[$id]['linkshare1'];
- $pconfig['linkshare2'] = $a_queues[$id]['linkshare2'];
- $pconfig['linkshare3'] = $a_queues[$id]['linkshare3'];
- $pconfig['bandwidth'] = $a_queues[$id]['bandwidth'];
- $pconfig['bandwidthtype'] = $a_queues[$id]['bandwidthtype'];
- $pconfig['associatedrule'] = $a_queues[$id]['associatedrule'];
+if (isset($id)) {
+ if (!is_numeric($id)) {
+ $i = 0;
+ foreach($config['shaper']['queue'] as $queue) {
+ if ($queue['name'] == $id)
+ $id = $i;
+ $i++;
+ }
+ }
+ if ($a_queues[$id]) {
+ $pconfig['priority'] = $a_queues[$id]['priority'];
+ $pconfig['mask'] = $a_queues[$id]['mask'];
+ $pconfig['name'] = $a_queues[$id]['name'];
+ $pconfig = $a_queues[$id];
+ $pconfig['red'] = $a_queues[$id]['red'];
+ $pconfig['ecn'] = $a_queues[$id]['ecn'];
+ $pconfig['rio'] = $a_queues[$id]['rio'];
+ $pconfig['borrow'] = $a_queues[$id]['borrow'];
+ $pconfig['defaultqueue'] = $a_queues[$id]['defaultqueue'];
+ $pconfig['parentqueue'] = $a_queues[$id]['parentqueue'];
+ $pconfig['upperlimit1'] = $a_queues[$id]['upperlimit1'];
+ $pconfig['upperlimit2'] = $a_queues[$id]['upperlimit2'];
+ $pconfig['upperlimit3'] = $a_queues[$id]['upperlimit3'];
+ $pconfig['realtime1'] = $a_queues[$id]['realtime1'];
+ $pconfig['realtime2'] = $a_queues[$id]['realtime2'];
+ $pconfig['realtime3'] = $a_queues[$id]['realtime3'];
+ $pconfig['linkshare1'] = $a_queues[$id]['linkshare1'];
+ $pconfig['linkshare2'] = $a_queues[$id]['linkshare2'];
+ $pconfig['linkshare3'] = $a_queues[$id]['linkshare3'];
+ $pconfig['bandwidth'] = $a_queues[$id]['bandwidth'];
+ $pconfig['bandwidthtype'] = $a_queues[$id]['bandwidthtype'];
+ $pconfig['associatedrule'] = $a_queues[$id]['associatedrule'];
+ }
}
if ($_POST) {
OpenPOWER on IntegriCloud