From ac228a7fad7a8c4cf709eeb2f9270a288664c0c7 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 28 Dec 2018 12:14:17 +0100 Subject: [PATCH] fixed error in massive operation Former-commit-id: 691f3557d44c686645cfa634eab3630d060def33 --- pandora_console/godmode/massive/massive_delete_modules.php | 2 +- pandora_console/include/functions_agents.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/godmode/massive/massive_delete_modules.php b/pandora_console/godmode/massive/massive_delete_modules.php index 8462d75b7e..74860bb50f 100755 --- a/pandora_console/godmode/massive/massive_delete_modules.php +++ b/pandora_console/godmode/massive/massive_delete_modules.php @@ -285,7 +285,7 @@ else { $filter = false; } $names = agents_get_modules (array_keys ($agents), - 'DISTINCT(tagente_modulo.nombre)', $filter, false); + 'tagente_modulo.nombre', $filter, false); foreach ($names as $name) { $modules[$name['nombre']] = $name['nombre']; } diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index d69a27d8fe..b10251b9b2 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -1231,8 +1231,8 @@ function agents_get_modules ($id_agent = null, $details = false, ON tagente.id_agente = tasg.id_agent WHERE tagente_modulo.delete_pending = 0 AND %s - GROUP BY tagente_modulo.id_agente_modulo - ORDER BY tagente_modulo.nombre', + GROUP BY 1 + ORDER BY 1', ($details != 'tagente_modulo.*' && $indexed) ? 'tagente_modulo.id_agente_modulo,' : '', io_safe_output(implode (",", (array) $details)), $sql_tags_join,