Ticket #11442: 11442.3.diff
File 11442.3.diff, 738 bytes (added by , 15 years ago) |
---|
-
wp-includes/comment.php
1263 1263 1264 1264 $comment_old = wp_clone(get_comment($comment_id)); 1265 1265 1266 if ( 'trash' == $comment_old->comment_approved && $status != 'trash' ) 1267 wp_untrash_comment( $comment_id ); 1268 elseif ( 'spam' == $comment_old->comment_approved && $status != 'spam' ) 1269 wp_unspam_comment( $comment_id ); 1270 1266 1271 if ( !$wpdb->update( $wpdb->comments, array('comment_approved' => $status), array('comment_ID' => $comment_id) ) ) { 1267 1272 if ( $wp_error ) 1268 1273 return new WP_Error('db_update_error', __('Could not update comment status'), $wpdb->last_error);