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
This commit is contained in:
rboren 2004-08-08 05:01:13 +00:00
parent 1a47e9d839
commit 0fb185071a
1 changed files with 15 additions and 4 deletions

View File

@ -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<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
@ -19,10 +34,6 @@ for ($i=0; $i<count($wpvarstoreset); $i += 1) {
}
}
if (!get_magic_quotes_gpc()) {
$_POST = add_magic_quotes($_POST);
}
switch ($action) {
case 'update':