Changeset 33561 for branches/3.7/src/wp-includes/post.php
- Timestamp:
- 08/03/2015 09:40:19 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7/src/wp-includes/post.php
r25976 r33561 2528 2528 foreach ( $group_by_status as $status => $comments ) { 2529 2529 // Sanity check. This shouldn't happen. 2530 if ( 'post-trashed' == $status ) 2530 if ( 'post-trashed' == $status ) { 2531 2531 $status = '0'; 2532 $comments_in = implode( "', '", $comments ); 2533 $wpdb->query( "UPDATE $wpdb->comments SET comment_approved = '$status' WHERE comment_ID IN ('" . $comments_in . "')" ); 2532 } 2533 $comments_in = implode( ', ', array_map( 'intval', $comments ) ); 2534 $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->comments SET comment_approved = %s WHERE comment_ID IN ($comments_in)", $status ) ); 2534 2535 } 2535 2536
Note: See TracChangeset
for help on using the changeset viewer.