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

* include/functions_api.php: fixed the function "api_get_gis_agent".
	Thanks Cucumber.
	
	* include/functions_io.php: cleaned source code style.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9491 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-03-04 09:57:31 +00:00
parent 0e3d993b59
commit 468d49df9e
3 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2014-03-04 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php: fixed the function "api_get_gis_agent".
Thanks Cucumber.
* include/functions_io.php: cleaned source code style.
2014-03-03 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php: fixed the call "get_total_modules" now

View File

@ -133,8 +133,11 @@ function returnData($returnType, $data, $separator = ';') {
}
else {
if (!empty($data['data'])) {
foreach ($data['data'] as $dataContent) {
$clean = array_map("array_apply_io_safe_output", $dataContent);
foreach ($clean as $k => $v) {
$clean[$k] = str_replace("\r", "\n", $clean[$k]);
$clean[$k] = str_replace("\n", " ", $clean[$k]);
@ -5249,7 +5252,7 @@ function api_get_gis_agent($id_agent, $trash1, $tresh2, $return_type, $user_in_d
if ($agent_gis_data) {
returnData($return_type,
array('type' => 'array', 'data' => $agent_gis_data));
array('type' => 'array', 'data' => array($agent_gis_data)));
}
else {
returnError('Error.');

View File

@ -229,7 +229,7 @@ function io_safe_output($value, $utf8 = true)
$valueHtmlEncode = str_replace("&lt;", '<', $valueHtmlEncode);
//Replace the html entitie of > for the char
$valueHtmlEncode = str_replace("&gt;", '>', $valueHtmlEncode);
$valueHtmlEncode = str_replace("&gt;", '>', $valueHtmlEncode);
//Revert html entities to chars
for ($i=0;$i<33;$i++) {