Changeset 33559
- Timestamp:
- 08/03/2015 09:39:49 PM (11 years ago)
- File:
-
- 1 edited
-
branches/3.9/src/wp-includes/post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.9/src/wp-includes/post.php
r28106 r33559 2737 2737 foreach ( $group_by_status as $status => $comments ) { 2738 2738 // Sanity check. This shouldn't happen. 2739 if ( 'post-trashed' == $status ) 2739 if ( 'post-trashed' == $status ) { 2740 2740 $status = '0'; 2741 $comments_in = implode( "', '", $comments ); 2742 $wpdb->query( "UPDATE $wpdb->comments SET comment_approved = '$status' WHERE comment_ID IN ('" . $comments_in . "')" ); 2741 } 2742 $comments_in = implode( ', ', array_map( 'intval', $comments ) ); 2743 $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->comments SET comment_approved = %s WHERE comment_ID IN ($comments_in)", $status ) ); 2743 2744 } 2744 2745
Note: See TracChangeset
for help on using the changeset viewer.