WordPress.org

Plugin Directory

Changeset 535125


Ignore:
Timestamp:
04/23/12 16:13:16 (2 years ago)
Author:
josephscott
Message:

Don't attempt to recheck comments that don't exist, or are too old.

Props tellyworth

File:
1 edited

Legend:

Unmodified
Added
Removed
  • akismet/trunk/akismet.php

    r533261 r535125  
    509509     
    510510    foreach ( (array) $comment_errors as $comment_id ) { 
    511         // if the comment no longer exists, remove the meta entry from the queue to avoid getting stuck 
    512         if ( !get_comment( $comment_id ) ) { 
     511        // if the comment no longer exists, or is too old, remove the meta entry from the queue to avoid getting stuck 
     512        $comment = get_comment( $comment_id ); 
     513        if ( !$comment || strtotime( $comment->comment_date_gmt ) < strtotime( "-15 days" ) ) { 
    513514            delete_comment_meta( $comment_id, 'akismet_error' ); 
    514515            continue; 
Note: See TracChangeset for help on using the changeset viewer.