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)
}
}
function interfaces_vlan_priorities()
function interfaces_vlan_priorities($want_none = false)
{
return array(
'1' => gettext('Background (1, lowest)'),
'0' => gettext('Best Effort (0, default)'),
'2' => gettext('Excellent Effort (2)'),
'3' => gettext('Critical Applications (3)'),
'4' => gettext('Video (4)'),
'5' => gettext('Voice (5)'),
'6' => gettext('Internetwork Control (6)'),
'7' => gettext('Network Control (7, highest)'),
);
$priorities = array();
if ($want_none) {
$priorities[''] = gettext('None');
}
$priorities['1'] = gettext('Background (1, lowest)');
$priorities['0'] = gettext('Best Effort (0, default)');
$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)
......
......@@ -536,12 +536,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
legacy_html_escape_form_data($pconfig);
/* select priorities, but also offer an empty first option */
$priorities = array_merge(array('' => gettext('None')), interfaces_vlan_priorities());
$priorities = interfaces_vlan_priorities(true);
include("head.inc");
?>
?>
<body>
<script type="text/javascript">
$( 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