Skip to content

Commit

Permalink
Solve issue #193 (#197)
Browse files Browse the repository at this point in the history
* Add the category openSuse in reports

Solve #193 Add the category openSuse in reports Computer SO and Distribution Linux, without affect the actual operation, even if not find the sistem openSuse the reports work same

* solve 'Linux' => 'Linux|Ubuntu|openSUSE', instead.
  • Loading branch information
egamxmx authored Dec 17, 2020
1 parent 695753a commit 2144f94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/inventory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ function computersByOS($config = []) {
$sql_entities = " AND c.`entities_id` IN ({$this->where_entities})";
$sql_states = self::getStateCondition('c.states_id');
$oses = ['Windows' => 'Windows',
'Linux' => 'Linux|Ubuntu',
'Linux' => 'Linux|Ubuntu|openSUSE',
'Solaris' => 'Solaris',
'AIX' => 'AIX',
'BSD' => 'BSD',
Expand Down Expand Up @@ -462,7 +462,7 @@ function reportHbarLinux($config = []) {
$sql_states2 = self::getStateCondition('c.states_id', true);

$data = [];
foreach ($DB->request('glpi_operatingsystems', "name LIKE '%Linux%' OR name LIKE '%Ubuntu%'") as $os) {
foreach ($DB->request('glpi_operatingsystems', "name LIKE '%Linux%' OR name LIKE '%Ubuntu%' OR name LIKE '%openSUSE%'") as $os) {
$iterator = $DB->request(
'glpi_computers', [
'SELECT' => [
Expand Down Expand Up @@ -516,7 +516,7 @@ function reportHbarLinuxDistro($config = []) {
$sql_states = self::getStateCondition('glpi_computers.states_id', true);

$data = [];
foreach ($DB->request('glpi_operatingsystems', "name LIKE '%Linux%' OR name LIKE '%Ubuntu%'") as $os) {
foreach ($DB->request('glpi_operatingsystems', "name LIKE '%Linux%' OR name LIKE '%Ubuntu%' OR name LIKE '%openSUSE%'") as $os) {
$number = countElementsInTable(
'glpi_computers', [
'INNER JOIN' => [
Expand Down

0 comments on commit 2144f94

Please sign in to comment.