Make WordPress Core

Changeset 15604


Ignore:
Timestamp:
09/09/2010 08:34:40 PM (16 years ago)
Author:
westi
Message:

Apply some bandaid to WP_Comments_Table::prepare_items() to cover more of the different ways we include post IDs in urls/ajax queries.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/default-list-tables.php

    r15603 r15604  
    20302030                global $post_id, $comment_status, $search;
    20312031
    2032                 $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
     2032                if ( isset( $_REQUEST['p'] ) )
     2033                        $post_id = absint( $_REQUEST['p'] );
     2034                elseif ( isset( $_REQUEST['post'] ) )
     2035                        $post_id = absint( $_REQUEST['post'] );
     2036                elseif ( isset( $_REQUEST['post_ID'] ) )
     2037                        $post_id = absint( $_REQUEST['post_ID'] );
     2038                else
     2039                        $post_id = 0;
    20332040
    20342041                $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all';
Note: See TracChangeset for help on using the changeset viewer.