diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 8b349a764f..71d17c61dd 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -17,7 +17,7 @@ $doaction = $wp_list_table->current_action(); if ( $doaction ) { check_admin_referer( 'bulk-comments' ); - if ( 'delete_all' == $do_action && !empty( $_REQUEST['pagegen_timestamp'] ) ) { + if ( 'delete_all' == $doaction && !empty( $_REQUEST['pagegen_timestamp'] ) ) { $comment_status = $wpdb->escape( $_REQUEST['comment_status'] ); $delete_time = $wpdb->escape( $_REQUEST['pagegen_timestamp'] ); $comment_ids = $wpdb->get_col( "SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = '$comment_status' AND '$delete_time' > comment_date_gmt" ); @@ -29,6 +29,7 @@ if ( $doaction ) { $comment_ids = array_map( 'absint', explode( ',', $_REQUEST['ids'] ) ); } else { wp_redirect( wp_get_referer() ); + exit; } $approved = $unapproved = $spammed = $unspammed = $trashed = $untrashed = $deleted = 0; @@ -217,6 +218,8 @@ if ( isset($_REQUEST['approved']) || isset($_REQUEST['deleted']) || isset($_REQU +
+ has_items() ) { ?> display_table(); ?> diff --git a/wp-admin/includes/default-list-tables.php b/wp-admin/includes/default-list-tables.php index bb48613705..bf4f37d106 100644 --- a/wp-admin/includes/default-list-tables.php +++ b/wp-admin/includes/default-list-tables.php @@ -2440,7 +2440,7 @@ class WP_Comments_Table extends WP_List_Table { if ( ( 'reply' == $action || 'quickedit' == $action ) && ! $this->from_ajax ) $action .= ' hide-if-no-js'; elseif ( ( $action == 'untrash' && $the_comment_status == 'trash' ) || ( $action == 'unspam' && $the_comment_status == 'spam' ) ) { - if ( '1' == get_comment_meta( $comment_id, '_wp_trash_meta_status', true ) ) + if ( '1' == get_comment_meta( $comment->comment_ID, '_wp_trash_meta_status', true ) ) $action .= ' approve'; else $action .= ' unapprove';