(config) set description when empty in legacy_config_get_interfaces

This commit is contained in:
Ad Schellevis 2016-05-26 15:41:13 +02:00
parent 2fd3a68d24
commit 75eec3cfe8
2 changed files with 2 additions and 1 deletions

View File

@ -73,6 +73,7 @@ function legacy_config_get_interfaces($filters = array())
}
}
if ($iface_match) {
$iface['descr'] = !empty($iface['descr']) ? $iface['descr'] : strtoupper($ifname);
$interfaces[$ifname] = $iface;
}
}

View File

@ -409,7 +409,7 @@ include("head.inc");
</thead>
<tbody>
<?php
foreach ($config['interfaces'] as $ifname => $iface):?>
foreach (legacy_config_get_interfaces(array("virtual" => false)) as $ifname => $iface):?>
<tr>
<td>
<strong><u><span onclick="location.href='/interfaces.php?if=<?=$ifname;?>'" style="cursor: pointer;"><?=!empty($iface['descr']) ? $iface['descr'] : strtoupper($ifname);?></span></u></strong>