From 2ab4faee68383698b06cc23eef6ce8f41612f58d Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 16 Feb 2006 12:55:46 +0000 Subject: WP updates git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@528 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-inst/wp-admin/post.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'wp-inst/wp-admin/post.php') diff --git a/wp-inst/wp-admin/post.php b/wp-inst/wp-admin/post.php index 4160ce5..11d46c2 100644 --- a/wp-inst/wp-admin/post.php +++ b/wp-inst/wp-admin/post.php @@ -184,7 +184,10 @@ case 'confirmdeletecomment': die( __('You are not allowed to delete comments on this post.') ); echo "
\n"; - echo "

" . __('Caution: You are about to delete the following comment:') . "

\n"; + if ( 'spam' == $_GET['delete_type'] ) + echo "

" . __('Caution: You are about to mark the following comment as spam:') . "

\n"; + else + echo "

" . __('Caution: You are about to delete the following comment:') . "

\n"; echo "\n"; echo "\n"; echo "\n"; @@ -195,6 +198,8 @@ case 'confirmdeletecomment': echo "\n"; echo "\n"; + if ( 'spam' == $_GET['delete_type'] ) + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -226,8 +231,10 @@ case 'deletecomment': if ( !current_user_can('edit_post', $comment->comment_post_ID) ) die( __('You are not allowed to edit comments on this post.') ); - wp_set_comment_status($comment->comment_ID, "delete"); - do_action('delete_comment', $comment->comment_ID); + if ( 'spam' == $_GET['delete_type'] ) + wp_set_comment_status($comment->comment_ID, 'spam'); + else + wp_delete_comment($comment->comment_ID); if (($_SERVER['HTTP_REFERER'] != "") && (false == $noredir)) { header('Location: ' . $_SERVER['HTTP_REFERER']); -- cgit
" . __('Author:') . "$comment->comment_author
" . __('E-mail:') . "$comment->comment_author_email