From 401d9dcf2164c055a08e91b908f5a26361e4c80f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 11 Jun 2010 10:39:59 +0000 Subject: [PATCH] removed now global available array_stripslashes --- etemplate/thumbnail.php | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/etemplate/thumbnail.php b/etemplate/thumbnail.php index 2002129faf..daa772df49 100644 --- a/etemplate/thumbnail.php +++ b/etemplate/thumbnail.php @@ -9,12 +9,6 @@ * @version $Id$ */ -// strip slashes from _GET parameters, if someone still has magic_quotes_gpc on -if (get_magic_quotes_gpc() && $_GET) -{ - $_GET = array_stripslashes($_GET); -} - if (isset($_GET['app'])) { $app = $_GET['app']; @@ -33,6 +27,12 @@ $GLOBALS['egw_info']['flags'] = array( ); include ('../header.inc.php'); +// strip slashes from _GET parameters, if someone still has magic_quotes_gpc on +if (get_magic_quotes_gpc() && $_GET) +{ + $_GET = array_stripslashes($_GET); +} + // no need to keep the session open (it stops other parallel calls) $GLOBALS['egw']->session->commit_session(); @@ -202,23 +202,3 @@ function gdVersion($user_ver = 0) $gd_ver = $match[0]; return $match[0]; } - -/** - * 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) ? array_stripslashes($val) : stripslashes($val); - } - return $var; -} -