From bdfad5c6fc17d9c471343199f268d1e188f117d2 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 16 Oct 2008 21:45:43 +0000 Subject: [PATCH] Delete all spam fixes from Viper007Bond git-svn-id: https://develop.svn.wordpress.org/trunk@9215 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/edit-comments.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index cd5849beea..7a37d0ca42 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -17,9 +17,9 @@ wp_enqueue_script( 'jquery-table-hotkeys' ); if ( ( isset( $_POST['delete_all_spam'] ) || isset( $_POST['delete_all_spam2'] ) ) && !empty( $_POST['pagegen_timestamp'] ) ) { check_admin_referer('bulk-spam-delete'); - $formtime = (int) $_POST['pagegen_timestamp']; + $delete_time = $wpdb->escape( $_POST['display_time'] ); + $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" ); - $deleted_spam = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND comment_date_gmt < FROM_UNIXTIME(%d)", $formtime ) ); wp_redirect('edit-comments.php?deleted=' . (int) $deleted_spam); } @@ -210,7 +210,7 @@ $page_links = paginate_links( array(
- +