Changeset 31172
- Timestamp:
- 01/13/2015 06:47:33 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r31171 r31172 2240 2240 $comment_ID = $data['comment_ID']; 2241 2241 $comment_post_ID = $data['comment_post_ID']; 2242 $keys = array( 'comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_type', 'comment_parent' );2242 $keys = array( 'comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt', 'comment_type', 'comment_parent', 'user_id' ); 2243 2243 $data = wp_array_slice_assoc( $data, $keys ); 2244 2244 $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) ); -
trunk/tests/phpunit/tests/comment.php
r31171 r31172 29 29 } 30 30 31 /** 32 * @ticket 30307 33 */ 34 function test_wp_update_comment_updates_user_id() { 35 $post_id = $this->factory->post->create(); 36 $comment_id = $this->factory->comment->create( array( 'comment_post_ID' => $post_id ) ); 37 38 wp_update_comment( array( 'comment_ID' => $comment_id, 'user_id' => 1 ) ); 39 40 $comment = get_comment( $comment_id ); 41 $this->assertEquals( 1, $comment->user_id ); 42 } 43 31 44 public function test_get_approved_comments() { 32 45 $p = $this->factory->post->create();
Note: See TracChangeset
for help on using the changeset viewer.