2011-09-08 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php: added in the output of get events the agent name and group name. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4953 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
b5138aecdb
commit
159c96b971
|
@ -1,3 +1,8 @@
|
||||||
|
2011-09-08 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions_api.php: added in the output of get events the agent
|
||||||
|
name and group name.
|
||||||
|
|
||||||
2011-09-14 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2011-09-14 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/help/en/help_gis_tab.php
|
* include/help/en/help_gis_tab.php
|
||||||
|
|
|
@ -1572,12 +1572,16 @@ function get_events__with_user($trash1, $trash2, $other, $returnType, $user_in_d
|
||||||
if ($group_rep == 0) {
|
if ($group_rep == 0) {
|
||||||
switch ($config["dbtype"]) {
|
switch ($config["dbtype"]) {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
$sql = "SELECT *
|
$sql = "SELECT *,
|
||||||
|
(SELECT t1.nombre FROM tagente AS t1 WHERE t1.id_agente = tevento.id_agente) AS agent_name,
|
||||||
|
(SELECT t2.nombre FROM tgrupo AS t2 WHERE t2.id_grupo = tevento.id_grupo) AS group_name
|
||||||
FROM tevento
|
FROM tevento
|
||||||
WHERE 1=1 ".$sql_post." ORDER BY utimestamp DESC LIMIT ".$offset.",".$pagination;
|
WHERE 1=1 ".$sql_post." ORDER BY utimestamp DESC LIMIT ".$offset.",".$pagination;
|
||||||
break;
|
break;
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
$sql = "SELECT *
|
$sql = "SELECT *,
|
||||||
|
(SELECT t1.nombre FROM tagente AS t1 WHERE t1.id_agente = tevento.id_agente) AS agent_name,
|
||||||
|
(SELECT t2.nombre FROM tgrupo AS t2 WHERE t2.id_grupo = tevento.id_grupo) AS group_name
|
||||||
FROM tevento
|
FROM tevento
|
||||||
WHERE 1=1 ".$sql_post." ORDER BY utimestamp DESC LIMIT ".$pagination." OFFSET ".$offset;
|
WHERE 1=1 ".$sql_post." ORDER BY utimestamp DESC LIMIT ".$pagination." OFFSET ".$offset;
|
||||||
break;
|
break;
|
||||||
|
@ -1585,7 +1589,9 @@ function get_events__with_user($trash1, $trash2, $other, $returnType, $user_in_d
|
||||||
$set = array();
|
$set = array();
|
||||||
$set['limit'] = $pagination;
|
$set['limit'] = $pagination;
|
||||||
$set['offset'] = $offset;
|
$set['offset'] = $offset;
|
||||||
$sql = "SELECT *
|
$sql = "SELECT *,
|
||||||
|
(SELECT t1.nombre FROM tagente AS t1 WHERE t1.id_agente = tevento.id_agente) AS agent_name,
|
||||||
|
(SELECT t2.nombre FROM tgrupo AS t2 WHERE t2.id_grupo = tevento.id_grupo) AS group_name
|
||||||
FROM tevento
|
FROM tevento
|
||||||
WHERE 1=1 ".$sql_post." ORDER BY utimestamp DESC";
|
WHERE 1=1 ".$sql_post." ORDER BY utimestamp DESC";
|
||||||
$sql = oracle_recode_query ($sql, $set);
|
$sql = oracle_recode_query ($sql, $set);
|
||||||
|
|
Loading…
Reference in New Issue