From 60a34f34fc12a4debe52ee957960541189e9df5b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 4 Feb 2005 13:40:56 +0000 Subject: [PATCH] Fixed disapearing backslashes if magic_quotes_gpc=Off. Now stripslashes is only run if it's On. --- etemplate/inc/class.uietemplate.inc.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index 58cc5e8c2f..bb1a6b694e 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -1081,8 +1081,10 @@ $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'] == stripslashes($value)) + if (isset($attr['blur']) && $attr['blur'] == $value) { $value = ''; // blur-values is equal to emtpy } @@ -1105,20 +1107,12 @@ } break; case 'htmlarea': - if (isset($value)) - { - $value = stripslashes($value); - } $this->set_array($content,$form_name,$value); break; case 'int': case 'float': case 'text': case 'textarea': - if (isset($value)) - { - $value = stripslashes($value); - } if ($value === '' && $attr['needed']) { $GLOBALS['phpgw_info']['etemplate']['validation_errors'][$form_name] = lang('Field must not be empty !!!',$value);