fix for bug [ 1345020 ] Need to un-escape form/html output...

--> happened with magic_quotes_gpc On
This commit is contained in:
Ralf Becker 2006-03-08 16:53:16 +00:00
parent 9bc52deb3e
commit e3c0783cee

View File

@ -36,6 +36,30 @@
function boaccounts()
{
$this->so =& CreateObject('admin.soaccounts');
if (get_magic_quotes_gpc()) // deal with magic_quotes_gpc On
{
$_POST = $this->array_stripslashes($_POST);
}
}
/**
* applies stripslashes recursivly on each element of an array
*
* @param array &$var
* @return array
*/
function array_stripslashes($var)
{
if (!is_array($var))
{
return stripslashes($var);
}
foreach($var as $key => $val)
{
$var[$key] = is_array($val) ? $this->array_stripslashes($val) : stripslashes($val);
}
return $var;
}
function DONTlist_methods($_type='xmlrpc')