From 00eac177c54357eee41905879832c5db6feff8b3 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Tue, 10 Apr 2012 13:37:06 +0000 Subject: [PATCH] 2012-04-10 Sergio Martin * include/functions_agents.php: Fixed an error when try to retrieve policy acl's without agents choosed git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5921 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/functions_agents.php | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 0c3ebc2079..49aed0977c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-04-10 Sergio Martin + + * include/functions_agents.php: Fixed an error when try + to retrieve policy acl's without agents choosed + 2012-04-10 Sergio Martin * include/javascript/pandora.js diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 5da04264e0..893dbbe24a 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -192,6 +192,13 @@ function agents_get_alerts_simple ($id_agent = false, $filter = '', $options = f $selectText = 'COUNT(talert_template_modules.id) AS count'; } + if(is_array($id_agent)) { + $extra_sql = enterprise_hook('policies_get_modules_sql_condition', array(reset($id_agent), 't3.', false)); + } + else { + $extra_sql = ''; + } + $extra_sql = enterprise_hook('policies_get_modules_sql_condition', array(reset($id_agent), 't3.', false)); if ($extra_sql === ENTERPRISE_NOT_HOOK) { $extra_sql = '';