fixed minor error order by desc event list

(cherry picked from commit 9a48e52208)
This commit is contained in:
daniel 2017-01-04 14:33:39 +01:00
parent 013c40fed4
commit d44dc61758
2 changed files with 6 additions and 3 deletions

View File

@ -112,7 +112,7 @@ function events_get_event ($id, $fields = false) {
function events_get_events_grouped($sql_post, $offset = 0, function events_get_events_grouped($sql_post, $offset = 0,
$pagination = 1, $meta = false, $history = false, $total = false, $pagination = 1, $meta = false, $history = false, $total = false,
$history_db = false) { $history_db = false, $order = "ASC") {
global $config; global $config;
@ -148,7 +148,7 @@ function events_get_events_grouped($sql_post, $offset = 0,
FROM $table te FROM $table te
WHERE 1=1 " . $sql_post . " WHERE 1=1 " . $sql_post . "
GROUP BY estado, evento, id_agentmodule" . $groupby_extra . " GROUP BY estado, evento, id_agentmodule" . $groupby_extra . "
ORDER BY timestamp_rep ASC LIMIT " . $offset . "," . $pagination; ORDER BY timestamp_rep " . $order . " LIMIT " . $offset . "," . $pagination;
} }
break; break;
case "postgresql": case "postgresql":

View File

@ -701,7 +701,10 @@ elseif ($group_rep == 1) {
$offset, $offset,
$pagination, $pagination,
$meta, $meta,
$history); $history,
false,
false,
'DESC');
} }
elseif ($group_rep == 2) { elseif ($group_rep == 2) {
$result = events_get_events_grouped_by_agent( $result = events_get_events_grouped_by_agent(