From 2ed8e66a7ca3ef94839eea67acd656b91490c8d4 Mon Sep 17 00:00:00 2001 From: dd32 Date: Sun, 26 Sep 2010 10:02:23 +0000 Subject: [PATCH] Use the correct variable names, Fixes "Empty Spam" comments & "Approve" link. Add a clear to push "No comments found." into place. Fixes #14964 git-svn-id: http://svn.automattic.com/wordpress/trunk@15666 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-comments.php | 5 ++++- wp-admin/includes/default-list-tables.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 8b349a764..71d17c61d 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 bb4861370..bf4f37d10 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';