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 = '';