Changeset 48748
- Timestamp:
- 08/07/2020 02:27:40 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r48658 r48748 3840 3840 $comment_batch_size = (int) apply_filters( 'wp_update_comment_type_batch_size', 100 ); 3841 3841 3842 // Update the `comment_type` field value to be `comment` for the next batch of comments.3843 $ wpdb->query(3842 // Get the IDs of the comments to update. 3843 $comment_ids = $wpdb->get_col( 3844 3844 $wpdb->prepare( 3845 " UPDATE {$wpdb->comments}3846 SET comment_type = 'comment'3845 "SELECT comment_ID 3846 FROM {$wpdb->comments} 3847 3847 WHERE comment_type = '' 3848 3848 ORDER BY comment_ID DESC … … 3852 3852 ); 3853 3853 3854 if ( $comment_ids ) { 3855 $comment_id_list = implode( ',', $comment_ids ); 3856 3857 // Update the `comment_type` field value to be `comment` for the next batch of comments. 3858 $wpdb->query( 3859 "UPDATE {$wpdb->comments} 3860 SET comment_type = 'comment' 3861 WHERE comment_type = '' 3862 AND comment_ID IN ({$comment_id_list})" // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared 3863 ); 3864 3865 // Make sure to clean the comment cache. 3866 clean_comment_cache( $comment_ids ); 3867 } 3868 3854 3869 delete_option( $lock_name ); 3855 3870 }
Note: See TracChangeset
for help on using the changeset viewer.