From 8d89ed90d3825ba4b6885e639f4e099e12bd1a15 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Mon, 17 Jul 2023 09:34:57 +0200 Subject: [PATCH] #11735 Fix Agent view modules --- pandora_console/include/ajax/module.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 0ab70681df..8cc2eca4a5 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -98,15 +98,18 @@ if (check_login()) { } $id_plugin = get_parameter('id_plugin', 0); - $id_module_plugin = db_get_value( - 'id_plugin', - 'tagente_modulo', - 'id_agente_modulo', - $get_module_macros - ); - if ($id_plugin !== $id_module_plugin) { - $get_plugin_macros = true; - $get_module_macros = 0; + + if ($id_plugin !== 0) { + $id_module_plugin = db_get_value( + 'id_plugin', + 'tagente_modulo', + 'id_agente_modulo', + $get_module_macros + ); + if ($id_plugin !== $id_module_plugin) { + $get_plugin_macros = true; + $get_module_macros = 0; + } } if ($get_plugin_macros) {