mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 19:03:14 +01:00
fix for bug [ 1120676 ] Date&Linking Probs in InfoLog:
caused by error in handling of array's when magic_quotes_gpc was on
This commit is contained in:
parent
423fa639fa
commit
6ad247a14b
@ -1013,6 +1013,24 @@
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 process_show
|
||||
@ -1037,6 +1055,10 @@
|
||||
}
|
||||
$content_in = $cname ? array($cname => $content) : $content;
|
||||
$content = array();
|
||||
if (get_magic_quotes_gpc())
|
||||
{
|
||||
$content_in = $this->array_stripslashes($content_in);
|
||||
}
|
||||
$GLOBALS['phpgw_info']['etemplate']['validation_errors'] = array();
|
||||
$this->canceled = $this->button_pressed = False;
|
||||
|
||||
@ -1052,8 +1074,6 @@
|
||||
$attr = array();
|
||||
}
|
||||
$value = $this->get_array($content_in,$form_name,True);
|
||||
|
||||
if ($value && get_magic_quotes_gpc()) $value = stripslashes($value);
|
||||
|
||||
if (isset($attr['blur']) && $attr['blur'] == $value)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user