Revision 6577d782
Added by Scott Ullrich over 19 years ago
usr/local/www/guiconfig.inc | ||
---|---|---|
490 | 490 |
usort($config['wol']['wolentry'], "wolcmp"); |
491 | 491 |
} |
492 | 492 |
|
493 |
function sort_rule_by_queue_priority() { |
|
494 |
global $g, $config; |
|
495 |
global $queues; |
|
496 |
|
|
497 |
function rqpcmp($a, $b) { |
|
498 |
global $queues; |
|
499 |
|
|
500 |
$ra = $queues[$a['outqueue']]; |
|
501 |
$rb = $queues[$b['outqueue']]; |
|
502 |
|
|
503 |
if ($ra == $rb) |
|
504 |
return 0; |
|
505 |
/* reverse sort - we want higher priority first */ |
|
506 |
return ($ra < $rb) ? 1 : -1; |
|
507 |
} |
|
508 |
|
|
509 |
foreach($config['shaper']['queue'] as $q) { |
|
510 |
$queues[$q['name']] = $q['priority']; |
|
511 |
} |
|
512 |
|
|
513 |
usort($config['shaper']['rule'], "rqpcmp"); |
|
514 |
} |
|
493 | 515 |
function gentitle($pgname) { |
494 | 516 |
global $config; |
495 | 517 |
return $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pgname; |
Also available in: Unified diff
MFC 8799
EZShaper wizard will now spit out rules ordered by queue priority in order to at least make a stab at a reasonable rule order