WordPress.org

Make WordPress Core

Changeset 9215


Ignore:
Timestamp:
10/16/08 21:45:43 (6 years ago)
Author:
ryan
Message:

Delete all spam fixes from Viper007Bond

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-comments.php

    r9183 r9215  
    1818    check_admin_referer('bulk-spam-delete'); 
    1919 
    20     $formtime = (int) $_POST['pagegen_timestamp']; 
    21  
    22     $deleted_spam = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND comment_date_gmt < FROM_UNIXTIME(%d)", $formtime ) ); 
     20    $delete_time = $wpdb->escape( $_POST['display_time'] ); 
     21    $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" ); 
     22 
    2323    wp_redirect('edit-comments.php?deleted=' . (int) $deleted_spam); 
    2424} 
     
    211211<input type="hidden" name="mode" value="<?php echo $mode; ?>" /> 
    212212<input type="hidden" name="comment_status" value="<?php echo $comment_status; ?>" /> 
    213 <input type="hidden" name="pagegen_timestamp" value="<?php echo current_time( 'timestamp', TRUE ); ?>" /> 
     213<input type="hidden" name="pagegen_timestamp" value="<?php echo current_time('mysql', 1); ?>" /> 
    214214 
    215215<div class="tablenav"> 
Note: See TracChangeset for help on using the changeset viewer.