Commit c7ac2083 authored by Franco Fichtner's avatar Franco Fichtner

firewall: array_merge() throws off indices

parent 0c096315
...@@ -135,18 +135,24 @@ function interfaces_loopback_configure($verbose = false) ...@@ -135,18 +135,24 @@ function interfaces_loopback_configure($verbose = false)
} }
} }
function interfaces_vlan_priorities() function interfaces_vlan_priorities($want_none = false)
{ {
return array( $priorities = array();
'1' => gettext('Background (1, lowest)'),
'0' => gettext('Best Effort (0, default)'), if ($want_none) {
'2' => gettext('Excellent Effort (2)'), $priorities[''] = gettext('None');
'3' => gettext('Critical Applications (3)'), }
'4' => gettext('Video (4)'),
'5' => gettext('Voice (5)'), $priorities['1'] = gettext('Background (1, lowest)');
'6' => gettext('Internetwork Control (6)'), $priorities['0'] = gettext('Best Effort (0, default)');
'7' => gettext('Network Control (7, highest)'), $priorities['2'] = gettext('Excellent Effort (2)');
); $priorities['3'] = gettext('Critical Applications (3)');
$priorities['4'] = gettext('Video (4)');
$priorities['5'] = gettext('Voice (5)');
$priorities['6'] = gettext('Internetwork Control (6)');
$priorities['7'] = gettext('Network Control (7, highest)');
return $priorities;
} }
function interfaces_vlan_configure($realif = '', $verbose = false) function interfaces_vlan_configure($realif = '', $verbose = false)
......
...@@ -536,12 +536,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -536,12 +536,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
legacy_html_escape_form_data($pconfig); legacy_html_escape_form_data($pconfig);
/* select priorities, but also offer an empty first option */ $priorities = interfaces_vlan_priorities(true);
$priorities = array_merge(array('' => gettext('None')), interfaces_vlan_priorities());
include("head.inc"); include("head.inc");
?>
?>
<body> <body>
<script type="text/javascript"> <script type="text/javascript">
$( document ).ready(function() { $( document ).ready(function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment