diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 06e6cfb19e..e61e0d9a69 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-05-09 Sergio Martin + + * include/functions_agents.php: Merged from 4.0 the extra_sql + get code + 2012-05-09 Sergio Martin * include/help/en/help_alert_macros.php diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 11b28480b3..7a542d25b8 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -192,8 +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 = ''; }else if ($extra_sql != '') {