2014-03-04 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_api.php: fixed the function
	"api_get_tactical_view". Thanks Cucumber.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9492 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-03-04 10:53:09 +00:00
parent 57268d0a38
commit 8710d7713c
2 changed files with 24 additions and 11 deletions

View File

@ -1,3 +1,8 @@
2014-03-04 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php: fixed the function
"api_get_tactical_view". Thanks Cucumber.
2014-03-04 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php: fixed the function "api_get_gis_agent".

View File

@ -6403,6 +6403,9 @@ function api_set_create_event($id, $trash1, $other, $returnType) {
// http://localhost/pandora_console/include/api.php?op=get&op2=tactical_view&apipass=1234&user=admin&pass=pandora
function api_get_tactical_view($trash1, $trash2, $trash3, $returnType) {
$tactical_info = reporting_get_group_stats();
switch ($returnType) {
case 'string':
$i = 0;
foreach ($tactical_info as $key => $data) {
if ($i == 0)
@ -6414,6 +6417,11 @@ function api_get_tactical_view($trash1, $trash2, $trash3, $returnType) {
}
$data = array('type' => 'string', 'data' => $result);
break;
case 'csv':
$data = array('type' => 'array', 'data' => array($tactical_info));
break;
}
returnData($returnType, $data);
return;