2014-05-20 Alejandro Gallardo <alejandro.gallardo@artica.es>

* include/functions_api.php: Fixed the function
	"get_events_with_user". Fixed the json output format.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9966 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
alexhigh 2014-05-20 14:44:07 +00:00
parent 46b9d64130
commit 9e3b7d0db1
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2014-05-20 Alejandro Gallardo <alejandro.gallardo@artica.es>
* include/functions_api.php: Fixed the function
"get_events_with_user". Fixed the json output format.
2014-05-20 Vanessa Gil <vanessa.gil@artica.es>
* operation/events/events.build_query.php

View File

@ -157,6 +157,8 @@ function returnData($returnType, $data, $separator = ';') {
}
break;
case 'json':
$data = array_apply_io_safe_output($data);
header('Content-type: application/json');
echo json_encode ($data);
break;
}
@ -5426,10 +5428,10 @@ function get_events_with_user($trash1, $trash2, $other, $returnType, $user_in_db
$id_group = (int)$filter['id_group'];
$user_groups = users_get_groups ($user_in_db, "IR");
$user_groups = users_get_groups ($user_in_db, "ER");
$user_id_groups = array();
if (!empty($user_groups))
$user_id_groups = array_keys ($groups);
$user_id_groups = array_keys ($user_groups);
$is_admin = (bool)db_get_value('is_admin', 'tusuario', 'id_user', $user_in_db);