Skip to content

Commit

Permalink
Maybe a fix
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Nov 22, 2023
1 parent ed19f68 commit b8cb880
Showing 1 changed file with 0 additions and 52 deletions.
52 changes: 0 additions & 52 deletions inc/networkinventory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -673,58 +673,6 @@ public function getAgentsSubnet($nb_computers, $subnet = '', $ipstart = '', $ipe
if (count($a_agentsid) == '0') {

Check failure on line 673 in inc/networkinventory.class.php

View workflow job for this annotation

GitHub Actions / Unit tests 7.4 mysql:5.7

Method PluginGlpiinventoryNetworkinventory::getAgentsSubnet() should return array but return statement is missing.

Check failure on line 673 in inc/networkinventory.class.php

View workflow job for this annotation

GitHub Actions / Unit tests 8.1 mariadb:10.6

Method PluginGlpiinventoryNetworkinventory::getAgentsSubnet() should return array but return statement is missing.

Check failure on line 673 in inc/networkinventory.class.php

View workflow job for this annotation

GitHub Actions / Unit tests 8.1 mariadb:11

Method PluginGlpiinventoryNetworkinventory::getAgentsSubnet() should return array but return statement is missing.

Check failure on line 673 in inc/networkinventory.class.php

View workflow job for this annotation

GitHub Actions / Unit tests 8.2 mariadb:10.6

Method PluginGlpiinventoryNetworkinventory::getAgentsSubnet() should return array but return statement is missing.

Check failure on line 673 in inc/networkinventory.class.php

View workflow job for this annotation

GitHub Actions / Unit tests 8.2 mariadb:11

Method PluginGlpiinventoryNetworkinventory::getAgentsSubnet() should return array but return statement is missing.

Check failure on line 673 in inc/networkinventory.class.php

View workflow job for this annotation

GitHub Actions / Unit tests 8.3-rc mariadb:11

Method PluginGlpiinventoryNetworkinventory::getAgentsSubnet() should return array but return statement is missing.
return $a_agentList;
}

$criteria = [
'SELECT' => [
'glpi_agents.id AS a_id',
'glpi_ipaddresses.name AS ip',
'token'
],
'FROM' => 'glpi_agents',
'LEFT JOIN' => [
'glpi_networkports' => [
'ON' => [
'glpi_networkports' => 'items_id',
'glpi_agents' => 'items_id'
]
],
'glpi_networknames' => [
'ON' => [
'glpi_networknames' => 'items_id',
'glpi_networkports' => 'id',
'AND' => [
'glpi_networknames.itemtype' => 'NetworkPort'
]
]
],
'glpi_ipaddresses' => [
'ON' => [
'glpi_ipaddresses' => 'items_id',
'glpi_networknames' => 'id',
'AND' => [
'glpi_ipaddresses.itemtype' => 'NetworkName'
]
]
],
'glpi_computers' => [
'ON' => [
'glpi_computers' => 'id',
'glpi_agents' => 'items_id'
]
]
],
'WHERE' => [
'glpi_agents.itemtype' => 'Computer',
'glpi_networkports.itemtype' => 'Computer',
'glpi_agents.id' => $a_agentsid,
'glpi_ipadresses.name' => ['!=', '127.0.0.1']
] + $where
];


$iterator = $DB->request($criteria);
Toolbox::logInFile('NET', $iterator->getSql() . "\n");
return $a_agentList;
}


Expand Down

0 comments on commit b8cb880

Please sign in to comment.