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