From 26e911a8c4d9df53f164155390e4b5f26e7a5a9a Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Tue, 31 Aug 2010 10:53:10 +0000 Subject: [PATCH] 2010-08-31 Sergio Martin * operation/agentes/status_monitor.php: Fixed the modules combo in the status monitor screen to show only the visible agents modules git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3205 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/operation/agentes/status_monitor.php | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2e5774828c..92bb7a51cc 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2010-08-31 Sergio Martin + + * operation/agentes/status_monitor.php: Fixed the + modules combo in the status monitor screen to + show only the visible agents modules + 2010-08-31 Sergio Martin * include/functions_db.php: Added support to '<>' diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 709c1fd315..4406652e66 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -69,7 +69,10 @@ print_select_from_sql ("SELECT * FROM tmodule_group ORDER BY name", echo ''.__('Module name').''; echo ''; -$modules = get_db_all_rows_filter ('tagente_modulo', false, 'DISTINCT(nombre)'); +$user_groups = implode (",", array_keys (get_user_groups ())); +$user_agents = implode (",", array_keys (get_group_agents($user_groups))); + +$modules = get_db_all_rows_filter ('tagente_modulo', array('id_agente' => $user_agents, 'nombre' => '<>delete_pending'), 'DISTINCT(nombre)'); print_select (index_array ($modules, 'nombre', 'nombre'), "ag_modulename", $ag_modulename, 'this.form.submit();', __('All'), '', false, false, true, '', false, 'width: 150px;'); @@ -96,7 +99,7 @@ if ($ag_group > 0 && give_acl ($config["id_user"], $ag_group, "AR")) { $sql .= sprintf (" AND tagente.id_grupo = %d", $ag_group); } else { // User has explicit permission on group 1 ? - $sql .= " AND tagente.id_grupo IN (".implode (",", array_keys (get_user_groups ())).")"; + $sql .= " AND tagente.id_grupo IN (".$user_groups.")"; } // Module group