Changeset 33557
- Timestamp:
- 08/03/2015 09:39:23 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1/src/wp-includes/post.php
r30735 r33557 2889 2889 foreach ( $group_by_status as $status => $comments ) { 2890 2890 // Sanity check. This shouldn't happen. 2891 if ( 'post-trashed' == $status ) 2891 if ( 'post-trashed' == $status ) { 2892 2892 $status = '0'; 2893 $comments_in = implode( "', '", $comments ); 2894 $wpdb->query( "UPDATE $wpdb->comments SET comment_approved = '$status' WHERE comment_ID IN ('" . $comments_in . "')" ); 2893 } 2894 $comments_in = implode( ', ', array_map( 'intval', $comments ) ); 2895 $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->comments SET comment_approved = %s WHERE comment_ID IN ($comments_in)", $status ) ); 2895 2896 } 2896 2897
Note: See TracChangeset
for help on using the changeset viewer.