mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
fix for bug #221: config (admin.uiconfig) is not saved properly, if magic_quotes_gpc is on
This commit is contained in:
parent
4c1b672b72
commit
6a0f1b67d3
@ -45,7 +45,7 @@
|
||||
|
||||
if(get_magic_quotes_gpc() && is_array($_POST['newsettings']))
|
||||
{
|
||||
$_POST['newsettings'] = array_map("stripslashes", $_POST['newsettings']);
|
||||
$_POST['newsettings'] = $this->array_stripslashes($_POST['newsettings']);
|
||||
}
|
||||
|
||||
switch($_GET['appname'])
|
||||
@ -250,5 +250,24 @@
|
||||
$t->set_var('lang_cancel', lang('Cancel'));
|
||||
$t->pfp('out','footer');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user