diff --git a/wp-admin/comment.php b/wp-admin/comment.php index 3ed3b82870..72d014703a 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -141,8 +141,10 @@ case 'deletecomment' : else wp_delete_comment( $comment->comment_ID ); - if ( '' != wp_get_referer() && false == $noredir ) + if ( '' != wp_get_referer() && false == $noredir && false === strpos(wp_get_referer(), 'comment.php' ) ) wp_redirect( wp_get_referer() ); + else if ( '' != wp_get_original_referer() && false == $noredir ) + wp_redirect( wp_get_original_referer() ); else wp_redirect( get_option('siteurl') . '/wp-admin/edit-comments.php' ); diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index f0baaee490..dfef0a78e9 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -46,7 +46,7 @@ $time = mysql2date(get_option('time_format'), $comment->comment_date);
comment_ID", 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . ""; +echo "comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . ""; ?>
@@ -95,6 +95,7 @@ echo "