Make WordPress Core

Ticket #8774: query_string_integrity.diff

File query_string_integrity.diff, 838 bytes (added by simonwheatley, 16 years ago)

Patch to restore entire query string when redirecting

  • Users/simon/Projects/WordPress/site/wordpress/wp-admin/admin.php

     
    6161                $page_hook = get_plugin_page_hook($plugin_page, $plugin_page);
    6262                // backwards compatibility for plugins using add_management_page
    6363                if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) {
    64                         wp_redirect('tools.php?page=' . $plugin_page);
     64                        // There could be plugin specific params on the URL, so we need the whole query string
     65                        $query_string = $_SERVER[ 'QUERY_STRING' ];
     66                        wp_redirect( 'tools.php?' . $query_string );
    6567                        exit;
    6668                }
    6769        }