From 8f82a03a026096150b4faa350fabe8beef07c1ec Mon Sep 17 00:00:00 2001 From: saxmatt Date: Fri, 17 Dec 2004 10:25:00 +0000 Subject: [PATCH] Comment notification fixes git-svn-id: http://svn.automattic.com/wordpress/trunk@1970 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-functions.php | 8 ++++---- wp-includes/functions-post.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/comment-functions.php b/wp-includes/comment-functions.php index b5af45107..d42116c9b 100644 --- a/wp-includes/comment-functions.php +++ b/wp-includes/comment-functions.php @@ -725,7 +725,6 @@ function wp_notify_postauthor($comment_id, $comment_type='comment') { */ function wp_notify_moderator($comment_id) { global $wpdb; - global $querystring_start, $querystring_equal, $querystring_separator; if( get_settings( "moderation_notify" ) == 0 ) return true; @@ -737,8 +736,9 @@ function wp_notify_moderator($comment_id) { $comment_author_domain = gethostbyaddr($comment->comment_author_IP); $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'"); - $notify_message = "A new comment on the post #$comment->comment_post_ID \"".$post->post_title."\" is waiting for your approval\r\n\r\n"; - $notify_message .= "Author : $comment->comment_author (IP: $comment->comment_author_IP , $comment_author_domain)\r\n"; + $notify_message = "A new comment on the post #$comment->comment_post_ID \"".$post->post_title."\" is waiting for your approval\n"; + $notify_message .= get_permalink($comment->comment_post_ID); + $notify_message .= "\n\nAuthor : $comment->comment_author (IP: $comment->comment_author_IP , $comment_author_domain)\r\n"; $notify_message .= "E-mail : $comment->comment_author_email\r\n"; $notify_message .= "URL : $comment->comment_author_url\r\n"; $notify_message .= "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$comment->comment_author_IP\r\n"; @@ -748,7 +748,7 @@ function wp_notify_moderator($comment_id) { $notify_message .= "Currently $comments_waiting comments are waiting for approval. Please visit the moderation panel:\r\n"; $notify_message .= get_settings('siteurl') . "/wp-admin/moderation.php\r\n"; - $subject = '[' . get_settings('blogname') . '] Please approve: "' .$post->post_title.'"'; + $subject = '[' . get_settings('blogname') . '] Please moderate: "' .$post->post_title.'"'; $admin_email = get_settings("admin_email"); $from = "From: $admin_email"; diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index f3073c8fe..5bce65b76 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -426,10 +426,10 @@ function wp_new_comment( $commentdata ) { do_action('comment_post', $comment_id); if ( !$approved ) - wp_notify_moderator($comment_ID); + wp_notify_moderator($comment_id); if ( get_settings('comments_notify') && $approved ) - wp_notify_postauthor($comment_ID, 'comment'); + wp_notify_postauthor($comment_id, 'comment'); return $result; }