From 77be60e4a30699cf82627023b7ea9cb25a09ede6 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 4 May 2023 18:24:11 +0200 Subject: [PATCH] fixed modules adopted pandora_enterprise#11103 --- pandora_console/godmode/agentes/module_manager.php | 6 +++--- pandora_console/include/ajax/module.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index 3cb5ce9787..f86167294c 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -830,8 +830,8 @@ if ($modules !== false) { $linked = policies_is_module_linked($module['id_agente_modulo']); $adopt = policies_is_module_adopt($module['id_agente_modulo']); - if ($linked !== false) { - if ($adopt === true) { + if ((bool) $linked !== false) { + if ((bool) $adopt === true) { $img = 'images/policies_brick.png'; $title = '('.__('Adopted').') '.$policyInfo['name_policy']; } else { @@ -839,7 +839,7 @@ if ($modules !== false) { $title = $policyInfo['name_policy']; } } else { - if ($adopt === true) { + if ((bool) $adopt === true) { $img = 'images/policies_not_brick.png'; $title = '('.__('Unlinked').') ('.__('Adopted').') '.$policyInfo['name_policy']; } else { diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 78751eb001..f4a2e66fdd 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -1058,8 +1058,8 @@ if (check_login()) { $policyInfo = policies_info_module_policy($module['id_policy_module']); $adopt = policies_is_module_adopt($module['id_agente_modulo']); - if ($linked === true) { - if ($adopt === true) { + if ((bool) $linked === true) { + if ((bool) $adopt === true) { $img = 'images/policies_brick.png'; $title = '('.__('Adopted').') '.$name_policy; } else { @@ -1067,7 +1067,7 @@ if (check_login()) { $title = $name_policy; } } else { - if ($adopt === true) { + if ((bool) $adopt === true) { $img = 'images/policies_not_brick.png'; $title = '('.__('Unlinked').') ('.__('Adopted').') '.$name_policy; } else {