mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-09 06:51:14 +01:00
Fixed disapearing backslashes if magic_quotes_gpc=Off. Now stripslashes is only run if it's On.
This commit is contained in:
parent
f48bb9f670
commit
b176bb96f3
@ -1052,8 +1052,10 @@
|
|||||||
$attr = array();
|
$attr = array();
|
||||||
}
|
}
|
||||||
$value = $this->get_array($content_in,$form_name,True);
|
$value = $this->get_array($content_in,$form_name,True);
|
||||||
|
|
||||||
|
if ($value && get_magic_quotes_gpc()) $value = stripslashes($value);
|
||||||
|
|
||||||
if (isset($attr['blur']) && $attr['blur'] == stripslashes($value))
|
if (isset($attr['blur']) && $attr['blur'] == $value)
|
||||||
{
|
{
|
||||||
$value = ''; // blur-values is equal to emtpy
|
$value = ''; // blur-values is equal to emtpy
|
||||||
}
|
}
|
||||||
@ -1076,20 +1078,12 @@
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'htmlarea':
|
case 'htmlarea':
|
||||||
if (isset($value))
|
|
||||||
{
|
|
||||||
$value = stripslashes($value);
|
|
||||||
}
|
|
||||||
$this->set_array($content,$form_name,$value);
|
$this->set_array($content,$form_name,$value);
|
||||||
break;
|
break;
|
||||||
case 'int':
|
case 'int':
|
||||||
case 'float':
|
case 'float':
|
||||||
case 'text':
|
case 'text':
|
||||||
case 'textarea':
|
case 'textarea':
|
||||||
if (isset($value))
|
|
||||||
{
|
|
||||||
$value = stripslashes($value);
|
|
||||||
}
|
|
||||||
if ($value === '' && $attr['needed'])
|
if ($value === '' && $attr['needed'])
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw_info']['etemplate']['validation_errors'][$form_name] = lang('Field must not be empty !!!',$value);
|
$GLOBALS['phpgw_info']['etemplate']['validation_errors'][$form_name] = lang('Field must not be empty !!!',$value);
|
||||||
|
Loading…
Reference in New Issue
Block a user