Changeset 1179

Show
Ignore:
Timestamp:
01/02/08 17:49:22 (1 year ago)
Author:
donncha
Message:

Use wp_redirect() instead of header(), fixes #522, props chmac

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/users.php

    r1139 r1179  
    256256 
    257257        if ( empty($_POST['users']) ) { 
    258                 header('Location: users.php'); 
     258                wp_redirect('users.php'); 
    259259        } 
    260260 
     
    273273        } 
    274274 
    275         header('Location: users.php?update=' . $update); 
     275        wp_redirect('users.php?update=' . $update); 
    276276 
    277277break; 
     
    282282 
    283283        if (empty($_POST['users'])) { 
    284                 header('Location: users.php'); 
     284                wp_redirect('users.php'); 
    285285        } 
    286286 
     
    357357                                $location = 'users.php?update=add'; 
    358358                        } 
    359                         header("Location: $location"); 
     359                        wp_redirect("$location"); 
    360360                        die(); 
    361361                } else { 
    362                         header('Location: users.php?update=notfound' ); 
     362                        wp_redirect('users.php?update=notfound' ); 
    363363                        die(); 
    364364                } 
    365365        } 
    366         header('Location: users.php'); 
     366        wp_redirect('users.php'); 
    367367        die(); 
    368368break; 
  • trunk/wp-signup.php

    r1167 r1179  
    99 
    1010if( is_array( get_site_option( 'illegal_names' )) && $_GET[ 'new' ] != '' && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) { 
    11         header( "Location: http://{$current_site->domain}{$current_site->path}" ); 
     11        wp_redirect( "http://{$current_site->domain}{$current_site->path}" ); 
    1212        die(); 
    1313} 
     
    2020 
    2121if( $current_blog->domain . $current_blog->path != $current_site->domain . $current_site->path ) { 
    22         header( "Location: http://" . $current_site->domain . $current_site->path . "wp-signup.php" ); 
     22        wp_redirect( "http://" . $current_site->domain . $current_site->path . "wp-signup.php" ); 
    2323        die(); 
    2424}