Define add_magic_quotes() in user-edit.php. Bug 0000216.

git-svn-id: https://develop.svn.wordpress.org/trunk@1515 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2004-08-08 05:01:13 +00:00
parent debef5a642
commit 851ff5f787
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':