[wp-trac] [WordPress Trac] #2836: wp_delete_comment() uses simple comment count decrementation instead of getting a fresh count

WordPress Trac wp-trac at lists.automattic.com
Sun Jun 18 11:27:25 GMT 2006


#2836: wp_delete_comment() uses simple comment count decrementation instead of
getting a fresh count
-------------------------+--------------------------------------------------
 Reporter:  markjaquith  |       Owner:  markjaquith
     Type:  defect       |      Status:  new        
 Priority:  normal       |   Milestone:  2.1        
Component:  General      |     Version:  2.0.3      
 Severity:  normal       |    Keywords:             
-------------------------+--------------------------------------------------
 wp_delete_comment() decrements the comment count for its parent post by
 subtracting 1 from the current count.  This perpetuates errors created by
 older plugins.  It also doesn't jive with comment creation, in which a
 fresh count is made.

 Maybe in a year or two, after plugins have been all updated to use the API
 functions, we can go back to simple incrementation/decrementation (which
 is faster, and saves a query), but for now, we should try to minimize
 comment count errors and do a fresh count on every change.

 I'll be uploading patches for trunk and the 2.0 branch shortly.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2836>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list