2011-09-22 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php: fixed the lost check for the timestamps in the "get_events" call. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4986 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
723a59e854
commit
497518132f
|
@ -1,3 +1,8 @@
|
|||
2011-09-22 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_api.php: fixed the lost check for the timestamps in the
|
||||
"get_events" call.
|
||||
|
||||
2011-09-22 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* operation/agentes/estado_monitores.php: Erased traces and db_clean_cache().
|
||||
|
|
|
@ -1540,6 +1540,14 @@ function get_events__with_user($trash1, $trash2, $other, $returnType, $user_in_d
|
|||
$pagination = $filter['limit'];
|
||||
if (isset($filter['offset']))
|
||||
$offset = $filter['offset'];
|
||||
if ($filter['utimestamp']) {
|
||||
if (isset($filter['utimestamp']['>'])) {
|
||||
$utimestamp_upper = $filter['utimestamp']['>'];
|
||||
}
|
||||
if (isset($filter['utimestamp']['<'])) {
|
||||
$utimestamp_bottom = $filter['utimestamp']['<'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//TODO MOVE THIS CODE AND THE CODE IN pandora_console/operation/events/events_list.php
|
||||
|
@ -1633,8 +1641,8 @@ function get_events__with_user($trash1, $trash2, $other, $returnType, $user_in_d
|
|||
(SELECT t2.icon FROM tgrupo AS t2 WHERE t2.id_grupo = tevento.id_grupo) AS group_icon
|
||||
FROM tevento" .
|
||||
//FOR THE TEST THE API IN THE ANDROID
|
||||
// "WHERE 1=1 ".$sql_post." ORDER BY id_evento ASC LIMIT ".$offset.",".$pagination;
|
||||
"WHERE 1=1 ".$sql_post." ORDER BY utimestamp DESC LIMIT ".$offset.",".$pagination;
|
||||
// " WHERE 1=1 ".$sql_post." ORDER BY id_evento ASC LIMIT ".$offset.",".$pagination;
|
||||
" WHERE 1=1 ".$sql_post." ORDER BY utimestamp DESC LIMIT ".$offset.",".$pagination;
|
||||
}
|
||||
break;
|
||||
case "postgresql":
|
||||
|
@ -1716,6 +1724,7 @@ function get_events__with_user($trash1, $trash2, $other, $returnType, $user_in_d
|
|||
}
|
||||
|
||||
$result = db_get_all_rows_sql ($sql);
|
||||
//html_debug_print($sql);
|
||||
|
||||
if (($result !== false) && (!$filter['total'])) {
|
||||
//Add the description and image
|
||||
|
|
Loading…
Reference in New Issue