From 59828c87c33266a8c40379fbd096a7af91df5cd9 Mon Sep 17 00:00:00 2001 From: donncha Date: Wed, 2 Jan 2008 17:49:22 +0000 Subject: Use wp_redirect() instead of header(), fixes #522, props chmac git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1179 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/users.php | 12 ++++++------ wp-signup.php | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/wp-admin/users.php b/wp-admin/users.php index 83c6cb5..f81b7ea 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -255,7 +255,7 @@ case 'doremove': check_admin_referer('remove-users'); if ( empty($_POST['users']) ) { - header('Location: users.php'); + wp_redirect('users.php'); } if ( !current_user_can('edit_users') ) @@ -272,7 +272,7 @@ case 'doremove': remove_user_from_blog($id); } - header('Location: users.php?update=' . $update); + wp_redirect('users.php?update=' . $update); break; @@ -281,7 +281,7 @@ case 'removeuser': check_admin_referer('bulk-users'); if (empty($_POST['users'])) { - header('Location: users.php'); + wp_redirect('users.php'); } if ( !current_user_can('edit_users') ) @@ -356,14 +356,14 @@ case 'addexistinguser': do_action( "added_existing_user", $user_id ); $location = 'users.php?update=add'; } - header("Location: $location"); + wp_redirect("$location"); die(); } else { - header('Location: users.php?update=notfound' ); + wp_redirect('users.php?update=notfound' ); die(); } } - header('Location: users.php'); + wp_redirect('users.php'); die(); break; default: diff --git a/wp-signup.php b/wp-signup.php index 3d75214..2e26f57 100644 --- a/wp-signup.php +++ b/wp-signup.php @@ -8,7 +8,7 @@ require( 'wp-blog-header.php' ); require_once( ABSPATH . WPINC . '/registration.php' ); if( is_array( get_site_option( 'illegal_names' )) && $_GET[ 'new' ] != '' && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) { - header( "Location: http://{$current_site->domain}{$current_site->path}" ); + wp_redirect( "http://{$current_site->domain}{$current_site->path}" ); die(); } @@ -19,7 +19,7 @@ function signuppageheaders() { } if( $current_blog->domain . $current_blog->path != $current_site->domain . $current_site->path ) { - header( "Location: http://" . $current_site->domain . $current_site->path . "wp-signup.php" ); + wp_redirect( "http://" . $current_site->domain . $current_site->path . "wp-signup.php" ); die(); } -- cgit