From bf8e2b03e2d8aab7b5db43a97374f617e8c88370 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 8 Nov 2006 21:14:53 +0000 Subject: [PATCH] redirect fixes from mdawaffe. fixes #3342. git-svn-id: http://svn.automattic.com/wordpress/trunk@4456 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/users.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/wp-admin/users.php b/wp-admin/users.php index 4a8e88790d..5d6807b394 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -14,7 +14,7 @@ $update = ''; if ( empty($_POST) ) { $referer = ''; } elseif ( isset($_POST['wp_http_referer']) ) { - $redirect = remove_query_arg(array('wp_http_referer', 'updated', 'delete_count'), urlencode(stripslashes($_POST['wp_http_referer']))); + $redirect = remove_query_arg(array('wp_http_referer', 'updated', 'delete_count'), stripslashes($_POST['wp_http_referer'])); $referer = ''; } else { $redirect = 'users.php'; @@ -181,9 +181,8 @@ case 'dodelete': ++$delete_count; } - $redirect = add_query_arg('delete_count', $delete_count, $redirect); - - wp_redirect(add_query_arg('update', $update, $redirect)); + $redirect = add_query_arg( array('delete_count' => $delete_count, 'update' => $update), $redirect); + wp_redirect($redirect); break; @@ -258,8 +257,8 @@ case 'adduser': $add_user_errors = $user_id; else { $new_user_login = apply_filters('pre_user_login', sanitize_user(stripslashes($_POST['user_login']), true)); - $redirect = add_query_arg('usersearch', $new_user_login, $redirect); - wp_redirect(add_query_arg('update', $update, $redirect) . '#user-' . $user_id); + $redirect = add_query_arg( array('usersearch' => urlencode($new_user_login), 'update' => $update), $redirect ); + wp_redirect( $redirect . '#user-' . $user_id ); die(); }