2010-10-19 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_io.php: fixed the function "safe_input" when the parameter is a array. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3421 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
40f27f4576
commit
5ab8eef006
|
@ -1,3 +1,8 @@
|
||||||
|
2010-10-19 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions_io.php: fixed the function "safe_input" when the
|
||||||
|
parameter is a array.
|
||||||
|
|
||||||
2010-10-18 Sancho Lerena <slerena@artica.es>
|
2010-10-18 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
* pandoradb.sql: Alter some trecon_task info to avoid problems on new
|
* pandoradb.sql: Alter some trecon_task info to avoid problems on new
|
||||||
|
|
|
@ -1,4 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* Safe input function for array.
|
||||||
|
*
|
||||||
|
* @param mixed $item The item pass as reference of item.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function safe_input_array(&$item) {
|
||||||
|
$item = safe_input($item);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cleans a string by encoding to UTF-8 and replacing the HTML
|
* Cleans a string by encoding to UTF-8 and replacing the HTML
|
||||||
* entities. UTF-8 is necessary for foreign chars like asian
|
* entities. UTF-8 is necessary for foreign chars like asian
|
||||||
|
@ -16,7 +27,7 @@ function safe_input($value) {
|
||||||
return $value;
|
return $value;
|
||||||
|
|
||||||
if (is_array($value)) {
|
if (is_array($value)) {
|
||||||
array_walk($value, "safe_input");
|
array_walk($value, "safe_input_array");
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue