Ticket #11442: 11442.4.diff
File 11442.4.diff, 1.2 KB (added by , 15 years ago) |
---|
-
wp-includes/comment.php
898 898 $status = '0'; 899 899 900 900 if ( wp_set_comment_status($comment_id, $status) ) { 901 delete_comment_meta($comment_id, '_wp_trash_meta_time');902 delete_comment_meta($comment_id, '_wp_trash_meta_status');903 901 do_action('untrashed_comment', $comment_id); 904 902 return true; 905 903 } … … 953 951 $status = '0'; 954 952 955 953 if ( wp_set_comment_status($comment_id, $status) ) { 956 delete_comment_meta($comment_id, '_wp_trash_meta_status');957 954 do_action('unspammed_comment', $comment_id); 958 955 return true; 959 956 } … … 1262 1259 } 1263 1260 1264 1261 $comment_old = wp_clone(get_comment($comment_id)); 1262 $old_status = $comment_old->comment_approved; 1263 1264 if ( !in_array( $status, array('trash','spam') ) && in_array( $old_status, array('trash','spam') ) ) { 1265 delete_comment_meta($comment_id, '_wp_trash_meta_time'); 1266 delete_comment_meta($comment_id, '_wp_trash_meta_status'); 1267 } 1265 1268 1266 1269 if ( !$wpdb->update( $wpdb->comments, array('comment_approved' => $status), array('comment_ID' => $comment_id) ) ) { 1267 1270 if ( $wp_error )