Changeset 33556
- Timestamp:
- 08/03/2015 09:38:43 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2/src/wp-includes/post.php
r32384 r33556 2906 2906 foreach ( $group_by_status as $status => $comments ) { 2907 2907 // Sanity check. This shouldn't happen. 2908 if ( 'post-trashed' == $status ) 2908 if ( 'post-trashed' == $status ) { 2909 2909 $status = '0'; 2910 $comments_in = implode( "', '", $comments ); 2911 $wpdb->query( "UPDATE $wpdb->comments SET comment_approved = '$status' WHERE comment_ID IN ('" . $comments_in . "')" ); 2910 } 2911 $comments_in = implode( ', ', array_map( 'intval', $comments ) ); 2912 $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->comments SET comment_approved = %s WHERE comment_ID IN ($comments_in)", $status ) ); 2912 2913 } 2913 2914
Note: See TracChangeset
for help on using the changeset viewer.