Make WordPress Core

Ticket #30307: comment_update_user_id.diff

File comment_update_user_id.diff, 836 bytes (added by jphase, 10 years ago)

Diff to allow user_id to be updated through wp_update_comment()

  • trunk/wp-includes/comment.php

     
    22302230
    22312231        $comment_ID = $data['comment_ID'];
    22322232        $comment_post_ID = $data['comment_post_ID'];
    2233         $keys = array( 'comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_parent' );
     2233        $keys = array( 'comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_parent', 'user_id' );
    22342234        $data = wp_array_slice_assoc( $data, $keys );
    22352235        $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) );
    22362236