2011-07-28 Ramon Novoa <rnovoa@artica.es>

* operation/events/events_list.php: Changed the event pagination query
	  (was too slow).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4642 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2011-07-28 09:58:15 +00:00
parent 84c9b92b80
commit 8e2edc65e2
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2011-07-28 Ramon Novoa <rnovoa@artica.es>
* operation/events/events_list.php: Changed the event pagination query
(was too slow).
2011-07-28 Sergio Martin <sergio.martin@artica.es>
* include/config_process.php

View File

@ -335,13 +335,12 @@ if ($group_rep == 0) {
$sql = "SELECT COUNT(id_evento) FROM tevento WHERE 1=1 ".$sql_post;
}
else {
$sql = "SELECT COUNT(*) FROM tevento WHERE id_evento IN (SELECT id_evento FROM tevento
WHERE 1=1 $sql_post GROUP BY evento, id_agentmodule)";
$sql = "SELECT COUNT(1) FROM (SELECT 1 FROM tevento
WHERE 1=1 $sql_post GROUP BY evento, id_agentmodule) AS t";
}
//Count the events with this filter (TODO but not utimestamp).
$total_events = (int) db_get_sql ($sql);
if (empty ($result)) {
$result = array ();
}