using global array_stripslashes function

This commit is contained in:
Ralf Becker 2016-05-05 07:22:37 +00:00
parent 1587c977b8
commit d140da563c
2 changed files with 3 additions and 33 deletions

View File

@ -2188,18 +2188,11 @@ class etemplate extends boetemplate
*
* @param array &$var
* @return array
* @deprecated use global array_stripslashes
*/
static function array_stripslashes($var)
{
if (!is_array($var))
{
return stripslashes($var);
}
foreach($var as $key => $val)
{
$var[$key] = is_array($val) ? self::array_stripslashes($val) : stripslashes($val);
}
return $var;
return array_stripslashes($var);
}
/**
@ -2229,7 +2222,7 @@ class etemplate extends boetemplate
$content = array();
if (get_magic_quotes_gpc())
{
$content_in = self::array_stripslashes($content_in);
$content_in = array_stripslashes($content_in);
}
self::$validation_errors = array();
$this->canceled = $this->button_pressed = False;

View File

@ -2374,29 +2374,6 @@ class infolog_ui
return $icon ? Api\Html::image('infolog',$icon,lang($alt),'border=0') : lang($alt);
}
/**
* stripping slashes from an array
*
* @static
* @param array $arr
* @return array
*/
function array_stripslashes($arr)
{
foreach($arr as $key => $val)
{
if (is_array($val))
{
$arr[$key] = self::array_stripslashes($val);
}
else
{
$arr[$key] = stripslashes($val);
}
}
return $arr;
}
/**
* Infolog's site configuration
*