From bf50c8f3ccd25e7ccdf4c2bb17db33dbcd3b3d42 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Mon, 7 Apr 2003 06:12:32 +0000 Subject: [PATCH] Fixed some email things, added whois. git-svn-id: http://svn.automattic.com/wordpress/trunk@6 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- b2comments.post.php | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/b2comments.post.php b/b2comments.post.php index c5f01794c4..92efe2e149 100644 --- a/b2comments.post.php +++ b/b2comments.post.php @@ -92,24 +92,25 @@ if ($ok) { $query = "INSERT INTO $tablecomments VALUES ('0','$comment_post_ID','$author','$email','$url','$user_ip','$now','$comment','0')"; $result = mysql_query($query); if (!$result) - die ("There is an error with the database, it can't store your comment...
Contact the webmaster"); + die ("There is an error with the database, it can't store your comment...
Contact the webmaster"); if ($comments_notify) { - $notify_message = "New comment on your post #$comment_post_ID.\r\n\r\n"; - $notify_message .= "author : $comment_author (IP: $user_ip , $user_domain)\r\n"; - $notify_message .= "e-mail : $comment_author_email\r\n"; - $notify_message .= "url : $comment_author_url\r\n"; - $notify_message .= "comment: \n".stripslashes($original_comment)."\r\n\r\n"; - $notify_message .= "You can see all comments on this post there: \r\n"; - $notify_message .= $siteurl.'/'.$blogfilename.$querystring_start.'p'.$querystring_equal.$comment_post_ID.$querystring_separator.'c'.$querystring_equal.'1'."\r\n\r\n"; + $notify_message = "New comment on your post #$comment_post_ID ".stripslashes($postdata['Title'])."\r\n\r\n"; + $notify_message .= "Author : $comment_author (IP: $user_ip , $user_domain)\r\n"; + $notify_message .= "E-mail : $comment_author_email\r\n"; + $notify_message .= "URL : $comment_author_url\r\n"; + $notify_message .= "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$user_ip"; + $notify_message .= "Comment: \n".stripslashes($original_comment)."\r\n\r\n"; + $notify_message .= "You can see all comments on this post here: \r\n"; + $notify_message .= comments_link('', false); $postdata = get_postdata($comment_post_ID); - $authordata = get_userdata($postdata["Author_ID"]); - $recipient = $authordata["user_email"]; - $subject = "comment on post #$comment_post_ID \"".$postdata["Title"]."\""; + $authordata = get_userdata($postdata['Author_ID']); + $recipient = $authordata['user_email']; + $subject = "[$blogname] Comment: \"".stripslashes($postdata['Title']).'"'; - @mail($recipient, $subject, $notify_message, "From: b2@".$HTTP_SERVER_VARS['SERVER_NAME']."\r\n"."X-Mailer: b2 $b2_version - PHP/" . phpversion()); + @mail($recipient, $subject, $notify_message, "From: \"$comment_author\" <$comment_author_email>\r\n"."X-Mailer: wordpress $b2_version with PHP/".phpversion()); }