mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
you can not use egroupwares autoloading before the basic egroupware objects are included, so we implement array_stripslashes in thumbnail.php itself, as it seems to be the fast way when get_magic_quotes_gpc is enabled
This commit is contained in:
parent
3ac8b33231
commit
989bba917f
@ -12,7 +12,7 @@
|
||||
// strip slashes from _GET parameters, if someone still has magic_quotes_gpc on
|
||||
if (get_magic_quotes_gpc() && $_GET)
|
||||
{
|
||||
$_GET = etemplate::array_stripslashes($_GET);
|
||||
$_GET = array_stripslashes($_GET);
|
||||
}
|
||||
|
||||
if (isset($_GET['app']))
|
||||
@ -202,3 +202,23 @@ function gdVersion($user_ver = 0)
|
||||
$gd_ver = $match[0];
|
||||
return $match[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* 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) ? array_stripslashes($val) : stripslashes($val);
|
||||
}
|
||||
return $var;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user