Changeset 33560
- Timestamp:
- 08/03/2015 09:40:03 PM (11 years ago)
- File:
-
- 1 edited
-
branches/3.8/src/wp-includes/post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8/src/wp-includes/post.php
r26664 r33560 2535 2535 foreach ( $group_by_status as $status => $comments ) { 2536 2536 // Sanity check. This shouldn't happen. 2537 if ( 'post-trashed' == $status ) 2537 if ( 'post-trashed' == $status ) { 2538 2538 $status = '0'; 2539 $comments_in = implode( "', '", $comments ); 2540 $wpdb->query( "UPDATE $wpdb->comments SET comment_approved = '$status' WHERE comment_ID IN ('" . $comments_in . "')" ); 2539 } 2540 $comments_in = implode( ', ', array_map( 'intval', $comments ) ); 2541 $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->comments SET comment_approved = %s WHERE comment_ID IN ($comments_in)", $status ) ); 2541 2542 } 2542 2543
Note: See TracChangeset
for help on using the changeset viewer.