mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Ticket #876. Actually use the friendly name for the key of the array returned by return_gateways_array() so the dynamic gateway and status pages work correctly.
This commit is contained in:
parent
4b4d550a5a
commit
c65e1e0da7
@ -330,14 +330,14 @@ function return_gateways_array($disabled = false) {
|
||||
}
|
||||
|
||||
/* retrieve a proper monitor IP? */
|
||||
$interface = $config['interfaces'][$ifname];
|
||||
if(is_ipaddr($interface['monitorip'])) {
|
||||
$gateway['monitor'] = $interface['monitorip'];
|
||||
} else {
|
||||
$ifcfg =& $config['interfaces'][$ifname];
|
||||
if (is_ipaddr($ifcfg['monitorip']))
|
||||
$gateway['monitor'] = $ifcfg['monitorip'];
|
||||
else
|
||||
$gateway['monitor'] = $gateway['gateway'];
|
||||
}
|
||||
$gateway['descr'] = "Interface $ifname Dynamic Gateway";
|
||||
$gateways_arr[$ifname] = $gateway;
|
||||
|
||||
$gateway['descr'] = "Interface {$friendly} Dynamic Gateway";
|
||||
$gateways_arr[$friendly] = $gateway;
|
||||
}
|
||||
|
||||
return($gateways_arr);
|
||||
|
||||
@ -176,29 +176,17 @@ include("head.inc");
|
||||
</td>
|
||||
<td class="listr" ondblclick="document.location='system_gateways_edit.php?id=<?=$i;?>';">
|
||||
<?php
|
||||
echo htmlspecialchars(convert_real_interface_to_friendly_descr($gateway['interface']));
|
||||
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($gateway['friendlyiface']));
|
||||
?>
|
||||
</td>
|
||||
<td class="listr" ondblclick="document.location='system_gateways_edit.php?id=<?=$i;?>';">
|
||||
<?php
|
||||
if(isset($gateway['interfacegateway'])) {
|
||||
echo strtoupper($gateway['interface']) . " ";
|
||||
} else {
|
||||
if(is_numeric($gateway['attribute']) && ($a_gateway_item[$gateway['attribute']]['gateway'] == "dynamic")) {
|
||||
echo "dynamic";
|
||||
} else {
|
||||
echo $gateway['gateway'] . " ";
|
||||
}
|
||||
}
|
||||
echo $gateway['gateway'] . " ";
|
||||
?>
|
||||
</td>
|
||||
<td class="listr" ondblclick="document.location='system_gateways_edit.php?id=<?=$i;?>';">
|
||||
<?php
|
||||
if(is_numeric($gateway['attribute']) && ($a_gateway_item[$gateway['attribute']]['monitor'] == "dynamic")) {
|
||||
echo "dynamic";
|
||||
} else {
|
||||
echo htmlspecialchars($gateway['monitor']) . " ";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php if($gateway['attribute'] == "system") : ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user