diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 81ef02fc34..1f5235d7d8 100644 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -48,7 +48,7 @@ if ($get_plugin_macros) { if ($search_modules) { $id_agents = json_decode(io_safe_output(get_parameter('id_agents'))); - $filter = get_parameter('q', '') . '%'; + $filter = '%' . get_parameter('q', '') . '%'; $other_filter = json_decode(io_safe_output(get_parameter('other_filter')), true); $modules = agents_get_modules($id_agents, false, diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 62a43605a1..f52f73a838 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -2007,6 +2007,12 @@ function html_print_autocomplete_modules($name = 'module', } }); }, + change: function( event, ui ) { + if (!ui.item) + $("input[name='_hidden']") + .val(0); + return false; + }, select: function( event, ui ) { $("input[name='_hidden']") .val(ui.item.value);