summaryrefslogtreecommitdiffstats
path: root/wp-inst/wp-admin/post.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-02-16 12:55:46 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-02-16 12:55:46 +0000
commit2ab4faee68383698b06cc23eef6ce8f41612f58d (patch)
tree5324a28a65ef148d30befb8d3ab38290d0118e8a /wp-inst/wp-admin/post.php
parent3274315bf43466070cd481ee2d08cf8114d3c8f7 (diff)
WP updates
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@528 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-admin/post.php')
-rw-r--r--wp-inst/wp-admin/post.php13
1 files changed, 10 insertions, 3 deletions
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 "<div class='wrap'>\n";
- echo "<p>" . __('<strong>Caution:</strong> You are about to delete the following comment:') . "</p>\n";
+ if ( 'spam' == $_GET['delete_type'] )
+ echo "<p>" . __('<strong>Caution:</strong> You are about to mark the following comment as spam:') . "</p>\n";
+ else
+ echo "<p>" . __('<strong>Caution:</strong> You are about to delete the following comment:') . "</p>\n";
echo "<table border='0'>\n";
echo "<tr><td>" . __('Author:') . "</td><td>$comment->comment_author</td></tr>\n";
echo "<tr><td>" . __('E-mail:') . "</td><td>$comment->comment_author_email</td></tr>\n";
@@ -195,6 +198,8 @@ case 'confirmdeletecomment':
echo "<form action='".get_settings('siteurl')."/wp-admin/post.php' method='get'>\n";
echo "<input type='hidden' name='action' value='deletecomment' />\n";
+ if ( 'spam' == $_GET['delete_type'] )
+ echo "<input type='hidden' name='delete_type' value='spam' />\n";
echo "<input type='hidden' name='p' value='$p' />\n";
echo "<input type='hidden' name='comment' value='{$comment->comment_ID}' />\n";
echo "<input type='hidden' name='noredir' value='1' />\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']);