Ticket #8863: 8863.patch
| File 8863.patch, 892 bytes (added by , 17 years ago) |
|---|
-
wp-includes/comment.php
1116 1116 return false; 1117 1117 } 1118 1118 1119 $comment_old = get_comment($comment_id); 1120 1119 1121 if ( !$wpdb->update( $wpdb->comments, array('comment_approved' => $status), array('comment_ID' => $comment_id) ) ) { 1120 1122 if ( $wp_error ) 1121 1123 return new WP_Error('db_update_error', __('Could not update comment status'), $wpdb->last_error); … … 1128 1130 $comment = get_comment($comment_id); 1129 1131 1130 1132 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); 1132 1134 1133 1135 wp_update_comment_count($comment->comment_post_ID); 1134 1136