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
This commit is contained in:
dd32 2010-09-26 10:02:23 +00:00
parent cb5fcf636b
commit 2ed8e66a7c
2 changed files with 5 additions and 2 deletions

View File

@ -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
<input type="hidden" name="paged" value="<?php echo esc_attr( absint( $_REQUEST['paged'] ) ); ?>" />
<?php } ?>
<br class="clear" />
<?php if ( $wp_list_table->has_items() ) { ?>
<?php $wp_list_table->display_table(); ?>

View File

@ -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';