wp_reset_vars() from Sewar. fixes #2888

git-svn-id: http://svn.automattic.com/wordpress/trunk@3946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2006-07-03 19:03:37 +00:00
parent 4de7f261cb
commit 55af15d623
16 changed files with 32 additions and 232 deletions

View File

@@ -8,21 +8,7 @@ else
$parent_file = 'profile.php';
$submenu_file = 'users.php';
$wpvarstoreset = array('action', 'redirect', 'profile', 'user_id', 'wp_http_referer');
for ($i=0; $i<count($wpvarstoreset); $i += 1) {
$wpvar = $wpvarstoreset[$i];
if (!isset($$wpvar)) {
if (empty($_POST["$wpvar"])) {
if (empty($_GET["$wpvar"])) {
$$wpvar = '';
} else {
$$wpvar = $_GET["$wpvar"];
}
} else {
$$wpvar = $_POST["$wpvar"];
}
}
}
wp_reset_vars(array('action', 'redirect', 'profile', 'user_id', 'wp_http_referer'));
$wp_http_referer = remove_query_arg(array('update', 'delete_count'), stripslashes($wp_http_referer));