diff --git a/html/includes/print-vlan.inc.php b/html/includes/print-vlan.inc.php
index 8ab7be263..53593c6fd 100644
--- a/html/includes/print-vlan.inc.php
+++ b/html/includes/print-vlan.inc.php
@@ -8,7 +8,20 @@ echo("
Vlan " . $vlan['vlan_vlan'] . " | ");
echo("" . $vlan['vlan_descr'] . " | ");
echo("");
-foreach (dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVlan` = ?", array($device['device_id'], $vlan['vlan_vlan'])) as $port)
+ $vlan_ports = array();
+ $otherports = dbFetchRows("SELECT * FROM `ports_vlans` AS V, `ports` as P WHERE V.`device_id` = ? AND V.`vlan` = ? AND P.interface_id = V.interface_id", array($device['device_id'], $vlan['vlan_vlan']));
+ foreach($otherports as $otherport)
+ {
+ $vlan_ports[$otherport[ifIndex]] = $otherport;
+ }
+ $otherports = dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVlan` = ?", array($device['device_id'], $vlan['vlan_vlan']));
+ foreach($otherports as $otherport)
+ {
+ $vlan_ports[$otherport[ifIndex]] = array_merge($otherport, array('untagged' => '1'));
+ }
+ ksort($vlan_ports);
+
+foreach ($vlan_ports as $port)
{
$port = ifLabel($port, $device);
if ($vars['view'] == "graphs")
@@ -29,6 +42,8 @@ foreach (dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVlan` = ?
{
echo($vlan['port_sep'] . generate_port_link($port, makeshortif($port['label'])));
$vlan['port_sep'] = ", ";
+ if($port['untagged']) { echo("(U)"); }
+
}
}
diff --git a/html/pages/device/port/vlans.inc.php b/html/pages/device/port/vlans.inc.php
index e008a5888..f284c8119 100644
--- a/html/pages/device/port/vlans.inc.php
+++ b/html/pages/device/port/vlans.inc.php
@@ -4,7 +4,7 @@ $vlans = dbFetchRows("SELECT * FROM `ports_vlans` AS PV, vlans AS V WHERE PV.`in
echo('');
-echo("| VLAN | Description | Cost | Priority | State | Other Ports | ");
+echo("| VLAN | Description | Cost | Priority | State | Other Ports | ");
$row=0;
foreach($vlans as $vlan)
@@ -19,19 +19,16 @@ foreach($vlans as $vlan)
echo("".$vlan['cost']." | ".$vlan['priority']." | ".$vlan['state']." | ");
$vlan_ports = array();
-
$otherports = dbFetchRows("SELECT * FROM `ports_vlans` AS V, `ports` as P WHERE V.`device_id` = ? AND V.`vlan` = ? AND P.interface_id = V.interface_id", array($device['device_id'], $vlan['vlan']));
foreach($otherports as $otherport)
{
$vlan_ports[$otherport[ifIndex]] = $otherport;
}
-
$otherports = dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVlan` = ?", array($device['device_id'], $vlan['vlan']));
foreach($otherports as $otherport)
{
- $vlan_ports[$otherport[ifIndex]] = array_merge($otherport, array('access' => '1'));
+ $vlan_ports[$otherport[ifIndex]] = array_merge($otherport, array('untagged' => '1'));
}
-
ksort($vlan_ports);
echo("");
@@ -39,7 +36,7 @@ foreach($vlans as $vlan)
foreach($vlan_ports as $otherport)
{
echo($vsep.generate_port_link($otherport, makeshortif($otherport['ifDescr'])));
- if($otherport['access']) { echo("(A)"); }
+ if($otherport['untagged']) { echo("(U)"); }
$vsep=", ";
}
echo(" | ");
|