diff --git a/CHANGELOG.md b/CHANGELOG.md index 963594d..f882189 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Fixed +- Fix `displayTabContentForItem` for `PluginDatabaseinventoryContactLog` - Fix foreign key constraint in `where` clause. ## [1.0.1] - 2024-12-11 diff --git a/inc/contactlog.class.php b/inc/contactlog.class.php index 476ed9a..4759be3 100644 --- a/inc/contactlog.class.php +++ b/inc/contactlog.class.php @@ -101,15 +101,14 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) public static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { - switch ($tabnum) { - case 1: + switch (get_class($item)) { + case (PluginDatabaseinventoryDatabaseParam::class): self::showForDatabaseParams($item); break; - case 2: + case (Agent::class): self::showForAgent($item); break; } - return true; } diff --git a/templates/contactlog.html.twig b/templates/contactlog.html.twig index e3f154e..ac27926 100644 --- a/templates/contactlog.html.twig +++ b/templates/contactlog.html.twig @@ -52,11 +52,11 @@ {% else %}