[wp-trac] Re: [WordPress Trac] #8510: If the most recent 5 comments are spam then the 'Recent Comments' dashboard widget will be empty

WordPress Trac wp-trac at lists.automattic.com
Sat Dec 6 21:49:38 GMT 2008


#8510: If the most recent 5 comments are spam then the 'Recent Comments' dashboard
widget will be empty
----------------------------+-----------------------------------------------
 Reporter:  johnconners     |        Owner:  anonymous
     Type:  defect          |       Status:  closed   
 Priority:  normal          |    Milestone:  2.7      
Component:  Administration  |      Version:  2.7      
 Severity:  normal          |   Resolution:  fixed    
 Keywords:  has-patch       |  
----------------------------+-----------------------------------------------
Comment (by DD32):

 Is there any reason that could not have just been replaced with

 {{{
 $in = "'" . join("', '", $allowed_states) . "'";

 $comments = $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE
 comment_approved IN($in) ORDER BY comment_date_gmt DESC LIMIT 5" )
 }}}
 (Might need some escape-checking..)

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8510#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list