WordPress.org

Make WordPress Core

Changeset 15508


Ignore:
Timestamp:
08/18/10 22:26:22 (4 years ago)
Author:
scribu
Message:

Fix the Trash quickling in edit-comments.php. See #14637

Location:
trunk/wp-admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r15497 r15508  
    640640        get_comment( $comment ); 
    641641        ob_start(); 
    642             $table->single_row( $comment->comment_ID, $mode, $status, true, true ); 
     642            $table->single_row( $comment->comment_ID, $mode, $comment_status, true, true ); 
    643643            $comment_list_item = ob_get_contents(); 
    644644        ob_end_clean(); 
  • trunk/wp-admin/edit-comments.php

    r15504 r15508  
    258258<input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr(current_time('mysql', 1)); ?>" /> 
    259259 
    260 <input type="hidden" name="_total" value="<?php echo esc_attr($total); ?>" /> 
    261 <input type="hidden" name="_per_page" value="<?php echo esc_attr($comments_per_page); ?>" /> 
    262 <input type="hidden" name="_page" value="<?php echo esc_attr($page); ?>" /> 
     260<input type="hidden" name="_total" value="<?php echo esc_attr( $table->get_pagination_arg('total_items') ); ?>" /> 
     261<input type="hidden" name="_per_page" value="<?php echo esc_attr( $table->get_pagination_arg('per_page') ); ?>" /> 
     262<input type="hidden" name="_page" value="<?php echo esc_attr( $table->get_pagination_arg('page') ); ?>" /> 
    263263 
    264264<?php if ( isset($_REQUEST['paged']) ) { ?> 
     
    279279    <input type="hidden" name="mode" value="<?php echo esc_attr($mode); ?>" /> 
    280280    <input type="hidden" name="comment_status" value="<?php echo esc_attr($comment_status); ?>" /> 
    281     <input type="hidden" name="page" value="<?php echo esc_attr($page); ?>" /> 
    282     <input type="hidden" name="per_page" value="<?php echo esc_attr($comments_per_page); ?>" /> 
     281    <input type="hidden" name="page" value="<?php echo esc_attr( $table->get_pagination_arg('page') ); ?>" /> 
     282    <input type="hidden" name="per_page" value="1" /> 
    283283    <input type="hidden" name="p" value="<?php echo esc_attr( $post_id ); ?>" /> 
    284284    <input type="hidden" name="comment_type" value="<?php echo esc_attr( $comment_type ); ?>" /> 
  • trunk/wp-admin/includes/default-list-tables.php

    r15504 r15508  
    19421942 
    19431943    function prepare_items() { 
    1944         global $post_id, $comment_status, $mode; 
     1944        global $post_id, $comment_status, $mode, $search; 
    19451945 
    19461946        $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0; 
     
    19561956        $search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : ''; 
    19571957 
    1958         if ( isset( $_POST['num'] ) ) 
    1959             $comments_per_page = $_POST['num']; 
     1958        if ( isset( $_POST['per_page'] ) ) 
     1959            $comments_per_page = $_POST['per_page']; 
    19601960        else 
    19611961            $comments_per_page = (int) get_user_option( 'edit_comments_per_page' ); 
  • trunk/wp-admin/includes/list-table.php

    r15505 r15508  
    134134 
    135135        $this->_pagination_args = $args; 
     136    } 
     137 
     138    /** 
     139     * Access the pagination args 
     140     * 
     141     * @since 3.1.0 
     142     * @access public 
     143     * 
     144     * @param string $key 
     145     * @return array 
     146     */ 
     147    function get_pagination_arg( $key ) { 
     148        if ( 'page' == $key ) 
     149            return $this->get_pagenum(); 
     150 
     151        return @$this->_pagination_args[ $key ]; 
    136152    } 
    137153 
  • trunk/wp-admin/js/edit-comments.dev.js

    r15506 r15508  
    210210 
    211211        theList.get(0).wpList.add( theExtraList.children(':eq(0)').remove().clone() ); 
    212 //      $('#get-extra-comments').submit(); See http://core.trac.wordpress.org/ticket/14637 
     212        $('#get-extra-comments').submit(); 
    213213    }; 
    214214 
Note: See TracChangeset for help on using the changeset viewer.