2011-06-20 Sergio Martin <sergio.martin@artica.es>

* operation/events/events_list.php: Fixed total events query
	used in pagination



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4468 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2011-06-20 09:55:14 +00:00
parent 4dcda3bf8b
commit 031e4f568c
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2011-06-20 Sergio Martin <sergio.martin@artica.es>
* operation/events/events_list.php: Fixed total events query
used in pagination
2011-06-17 Ramon Novoa <rnovoa@artica.es>
* godmode/alerts/alert_actions.php: Aesthetic fix.

View File

@ -322,11 +322,10 @@ if ($group_rep == 0) {
$sql = "SELECT COUNT(id_evento) FROM tevento WHERE 1=1 ".$sql_post;
}
else {
$sql = "SELECT COUNT(DISTINCT(evento)) FROM tevento WHERE 1=1 ".$sql_post;
$sql = "SELECT COUNT(*) FROM tevento WHERE id_evento IN (SELECT id_evento FROM tevento
WHERE 1=1 $sql_post GROUP BY evento, id_agentmodule)";
}
//Count the events with this filter (TODO but not utimestamp).
$total_events = (int) db_get_sql ($sql);