WordPress.org

Make WordPress Core

Ticket #8863: wp-includes--comment.php.diff

File wp-includes--comment.php.diff, 873 bytes (added by josephscott, 9 years ago)
  • wp-includes/comment.php

     
    10891089        // Escape data pulled from DB.
    10901090        $comment = $wpdb->escape($comment);
    10911091
     1092        // Save status info, it might have changed
     1093        $new_status = $commentarr['comment_status'];
     1094        $old_status = $comment['comment_approved'];
     1095
    10921096        // Merge old and new fields with new fields overwriting old ones.
    10931097        $commentarr = array_merge($comment, $commentarr);
    10941098
     
    11171121        wp_update_comment_count($comment_post_ID);
    11181122        do_action('edit_comment', $comment_ID);
    11191123        $comment = get_comment($comment_ID);
    1120         wp_transition_comment_status($comment_approved, $comment->comment_approved, $comment);
     1124        wp_transition_comment_status( $new_status, $old_status, $comment );
    11211125        return $rval;
    11221126}
    11231127