diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-01-22 02:57:05 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-01-22 02:57:05 +0000 |
commit | 12bcdc89e94842ee2411661509f7627ff39f2367 (patch) | |
tree | 45111bbe7a398ab6004e5a1119227098fc6c4f4a /usr/local/www/firewall_shaper.php | |
parent | 44ce4df14a21aaf47569a1c2f3755713dcc45da1 (diff) | |
download | pfsense-12bcdc89e94842ee2411661509f7627ff39f2367.zip pfsense-12bcdc89e94842ee2411661509f7627ff39f2367.tar.gz |
Commit what I have so far. Magic shaper now works 100% .. or atleast appears to!
Diffstat (limited to 'usr/local/www/firewall_shaper.php')
-rwxr-xr-x | usr/local/www/firewall_shaper.php | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/usr/local/www/firewall_shaper.php b/usr/local/www/firewall_shaper.php index 60e8963..5bb61e4 100755 --- a/usr/local/www/firewall_shaper.php +++ b/usr/local/www/firewall_shaper.php @@ -33,26 +33,25 @@ require("guiconfig.inc"); -if (!is_array($config['pfqueueing']['rule'])) { - $config['pfqueueing']['rule'] = array(); +if (!is_array($config['shaper']['rule'])) { + $config['shaper']['rule'] = array(); } -if (!is_array($config['pfqueueing']['pipe'])) { - $config['pfqueueing']['pipe'] = array(); +if (!is_array($config['shaper']['pipe'])) { + $config['shaper']['pipe'] = array(); } -if (!is_array($config['pfqueueing']['queue'])) { - $config['pfqueueing']['queue'] = array(); +if (!is_array($config['shaper']['queue'])) { + $config['shaper']['queue'] = array(); } -$a_shaper = &$config['pfqueueing']['rule']; -$a_pipe = &$config['pfqueueing']['pipe']; -$a_queue = &$config['pfqueueing']['queue']; +$a_shaper = &$config['shaper']['rule']; +$a_queue = &$config['shaper']['queue']; -$pconfig['enable'] = isset($config['pfqueueing']['enable']); +$pconfig['enable'] = isset($config['shaper']['enable']); if ($_POST) { if ($_POST['submit']) { $pconfig = $_POST; - $config['pfqueueing']['enable'] = $_POST['enable'] ? true : false; + $config['shaper']['enable'] = $_POST['enable'] ? true : false; write_config(); } @@ -199,22 +198,16 @@ if ($_GET['act'] == "del") { </td> <td class="listr"><?=$textss;?> <?php - if (isset($shaperent['targetpipe'])) { - if ($a_pipe[$shaperent['targetpipe']]['descr']) - $desc = htmlspecialchars($a_pipe[$shaperent['targetpipe']]['descr']); + if (isset($shaperent['targetqueue'])) { + if ($a_queue[$shaperent['targetqueue']]['name']) + $desc = htmlspecialchars($a_queue[$shaperent['targetqueue']]['name']); else - $desc = "Pipe " . ($shaperent['targetpipe']+1); - echo "<a href=\"firewall_shaper_pipes_edit.php?id={$shaperent['targetpipe']}\">{$desc}</a>"; - } else if (isset($shaperent['targetqueue'])) { - if ($a_queue[$shaperent['targetqueue']]['descr']) - $desc = htmlspecialchars($a_queue[$shaperent['targetqueue']]['descr']); - else - $desc = "Queue " . ($shaperent['targetqueue']+1); - echo "<a href=\"firewall_shaper_queues_edit.php?id={$shaperent['targetqueue']}\">{$desc}</a>"; + $desc = "Queue " . ($shaperent['targetpipe']+1); + echo "<a href=\"firewall_shaper_pipes_edit.php?id={$shaperent['targetqueue']}\">{$desc}</a>"; } ?><?=$textse;?> </td> - <td class="listbg"> + <td class="listbg"><font color="white"> <?=$textss;?><?=htmlspecialchars($shaperent['descr']);?><?=$textse;?> </td> <td valign="middle" nowrap class="list"> <a href="firewall_shaper_edit.php?id=<?=$i;?>"><img src="e.gif" title="edit rule" width="17" height="17" border="0"></a> |