diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e252c1a3b2..e5bed3f1a4 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-11-05 Sergio Martin + + * include/fgraph.php: Fixed event graphs by user for + bug 3102830 + 2010-11-04 Ramon Novoa * include/functions_ui.php: Check that the alert has a 'standby' column diff --git a/pandora_console/include/fgraph.php b/pandora_console/include/fgraph.php index 7c3fba91c3..d89eb080d1 100644 --- a/pandora_console/include/fgraph.php +++ b/pandora_console/include/fgraph.php @@ -893,19 +893,20 @@ function grafico_eventos_usuario ($width, $height) { $data = array (); $max_items = 5; - $sql = sprintf ('SELECT COUNT(id_evento),id_usuario + $sql = sprintf ('SELECT COUNT(id_evento) events,id_usuario FROM tevento GROUP BY id_usuario ORDER BY 1 DESC LIMIT %d', $max_items); $events = get_db_all_rows_sql ($sql); + foreach ($events as $event) { - $data[$event[1]] = $event[0]; + $data['id_usuario'] = $event['events']; } if (! $graphic_type) { return fs_3d_pie_chart ($data, $width, $height); } - generic_pie_graph ($width, $height, $data); + //generic_pie_graph ($width, $height, $data); } /**