Skip to content

Commit

Permalink
Fix visibility of injection models
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz authored Feb 22, 2024
1 parent 4cdf92c commit a6904db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Fixed

- Fix visibility of injection models


## [2.13.5] - 2024-02-22

Expand Down
6 changes: 3 additions & 3 deletions hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -1986,9 +1986,9 @@ function plugin_datainjection_addDefaultWhere($itemtype)
foreach ($models as $model) {
$tab[] = $model['id'];
}
if (count($tab) > 0) {
return "`glpi_plugin_datainjection_models`.`id` IN ('" . implode("','", $tab) . "')";
}
return "`glpi_plugin_datainjection_models`.`id` IN ('" . implode("','", $tab) . "')";
} else {
return "1 = 0"; //no model available -> force WHERE clause to get no result
}
return false;
default:
Expand Down

0 comments on commit a6904db

Please sign in to comment.