WordPress.org

Make WordPress Core

Changeset 11860


Ignore:
Timestamp:
08/21/09 01:27:01 (5 years ago)
Author:
ryan
Message:

Pass correct old status when transitioning comment status. Props hakre. fixes #8863

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r11836 r11860  
    11171117    } 
    11181118 
     1119    $comment_old = get_comment($comment_id); 
     1120 
    11191121    if ( !$wpdb->update( $wpdb->comments, array('comment_approved' => $status), array('comment_ID' => $comment_id) ) ) { 
    11201122        if ( $wp_error ) 
     
    11291131 
    11301132    do_action('wp_set_comment_status', $comment_id, $comment_status); 
    1131     wp_transition_comment_status($comment_status, $comment->comment_approved, $comment); 
     1133    wp_transition_comment_status($comment_status, $comment_old->comment_approved, $comment); 
    11321134 
    11331135    wp_update_comment_count($comment->comment_post_ID); 
Note: See TracChangeset for help on using the changeset viewer.