From bcda65f08e99f0d6ce64450f69d7f659eb844ff1 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 31 Aug 2011 17:20:20 +0000 Subject: [PATCH] 2011-08-31 Miguel de Dios * godmode/massive/massive_edit_modules.php: fixed when is selected "any" agent, with white space run fine. Fixes: #3401591 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4864 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ .../godmode/massive/massive_edit_modules.php | 13 +++++++++++-- pandora_server/util/agent_names.txt | 4 ++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 pandora_server/util/agent_names.txt diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index ea1521c1e9..07d5794d8d 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2011-08-31 Miguel de Dios + + * godmode/massive/massive_edit_modules.php: fixed when is selected "any" + agent, with white space run fine. + + Fixes: #3401591 + 2011-08-31 Miguel de Dios * include/functions_agents.php: fixed the fields as sql operations as field. diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index 64272c48ee..f37cbf669c 100644 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -51,16 +51,25 @@ function process_manage_edit ($module_name, $agents_select = null) { // Whether to update module tag info $update_tags = get_parameter('id_tag', false); + + +if (array_search(0, $agents_select) !== false) { + $modules = db_get_all_rows_filter ('tagente_modulo', + array ('nombre' => $module_name), + array ('id_agente_modulo')); +} +else { $modules = db_get_all_rows_filter ('tagente_modulo', array ('id_agente' => $agents_select, 'nombre' => $module_name), array ('id_agente_modulo')); +} db_process_sql_begin (); - + if ($modules === false) return false; - + foreach ($modules as $module) { $result = modules_update_agent_module ($module['id_agente_modulo'], $values, true, $update_tags); diff --git a/pandora_server/util/agent_names.txt b/pandora_server/util/agent_names.txt new file mode 100644 index 0000000000..f0a3c9c27f --- /dev/null +++ b/pandora_server/util/agent_names.txt @@ -0,0 +1,4 @@ +salamanca +valladolid +leon +madrid