Skip to content

Commit

Permalink
Fix network ports display; fixes #5460 #5461
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne authored and trasher committed Feb 25, 2019
1 parent 88bca2a commit c471f9d
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions inc/networkportinstantiation.class.php
Expand Up @@ -278,17 +278,21 @@ function getInstantiationHTMLTable(NetworkPort $netport, HTMLTableRow $row,
$virtual_header = $row->getHeaderByName('Instantiation', 'VirtualPorts');

$iterator = $DB->request([
'FROM' => new \QueryUnion([
'FROM' => new \QueryUnion(
[
'SELECT' => 'networkports_id',
'FROM' => 'glpi_networkportaliases',
'WHERE' => ['networkports_id_alias' => $netport->getID()]
], [
'SELECT' => 'networkports_id',
'FROM' => 'glpi_networkportaggregates',
'WHERE' => ['networkports_id_list' => ['LIKE', '%"'.$netport-getID().'"%']]
]
])
[
'SELECT' => 'networkports_id',
'FROM' => 'glpi_networkportaliases',
'WHERE' => ['networkports_id_alias' => $netport->getID()]
], [
'SELECT' => 'networkports_id',
'FROM' => 'glpi_networkportaggregates',
'WHERE' => ['networkports_id_list' => ['LIKE', '%"'.$netport->getID().'"%']]
]
],
false,
'networkports'
)
]);

if (count($iterator)) {
Expand Down

0 comments on commit c471f9d

Please sign in to comment.