From 0fb185071a6c4240456b2d2fb22fc8383adafcf2 Mon Sep 17 00:00:00 2001 From: rboren Date: Sun, 8 Aug 2004 05:01:13 +0000 Subject: [PATCH] Define add_magic_quotes() in user-edit.php. Bug 0000216. git-svn-id: http://svn.automattic.com/wordpress/trunk@1515 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/user-edit.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php index 254382f031..628aadb076 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -3,6 +3,21 @@ require_once('../wp-includes/wp-l10n.php'); $title = __('Edit User'); +function add_magic_quotes($array) { + foreach ($array as $k => $v) { + if (is_array($v)) { + $array[$k] = add_magic_quotes($v); + } else { + $array[$k] = addslashes($v); + } + } + return $array; +} + +if (!get_magic_quotes_gpc()) { + $_POST = add_magic_quotes($_POST); +} + $wpvarstoreset = array('action', 'standalone', 'redirect', 'profile', 'user_id'); for ($i=0; $i