WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/12/2011 05:24:34 PM (11 years ago)
Author:
nacin
Message:

Force get_pagenum to validate max pages. Add sanity redirect code to upload.php. see #16187. props MarkJaquith, greuben.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-list-table.php

    r17270 r17271  
    438438    function get_pagenum() {
    439439        $pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
     440
     441        if( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] )
     442            $pagenum = $this->_pagination_args['total_pages'];
    440443
    441444        return max( 1, $pagenum );
Note: See TracChangeset for help on using the changeset viewer.