Make WordPress Core


Ignore:
Timestamp:
01/13/2011 12:03:38 AM (13 years ago)
Author:
markjaquith
Message:

Add "paged param is greater than total pages" redirects to a few more screens. props greuben. fixes #16187

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/network/sites.php

    r17144 r17274  
    1818
    1919$wp_list_table = get_list_table('WP_MS_Sites_List_Table');
     20$pagenum = $wp_list_table->get_pagenum();
    2021
    2122$title = __( 'Sites' );
     
    8889$wp_list_table->prepare_items();
    8990
     91$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
     92if ( $pagenum > $total_pages && $total_pages > 0 ) {
     93    wp_redirect( add_query_arg( 'paged', $total_pages ) );
     94    exit;
     95}
     96
    9097require_once( '../admin-header.php' );
    9198?>
Note: See TracChangeset for help on using the changeset viewer.