diff --git a/b2trackback.php b/b2trackback.php
index 00a7b83a0..dc700161b 100644
--- a/b2trackback.php
+++ b/b2trackback.php
@@ -1,41 +1,10 @@
-
-
+get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id AND comment_content LIKE '%%' ORDER BY comment_date"); if ($resultc) {
- ?>
-
-
Trackbacks
-
-The URL to TrackBack this entry is:
-
-
-
- comment_ID); ?>
-
-
-
-
-
- - No trackbacks yet.
-
-
-
-
-
-
-
-query($query);
+ $result = $wpdb->query("INSERT INTO $tablecomments VALUES ('0', '$comment_post_ID', '$author', '$email', '$tb_url', '$user_ip', '$now', '$comment', '0')");
if (!$result) {
die ("There is an error with the database, it can't store your comment...
Contact the webmaster");
} else {
-
- if ($comments_notify) {
-
- $notify_message = "New trackback on your post #$comment_post_ID.\r\n\r\n";
- $notify_message .= "website: $comment_author (IP: $user_ip , $user_domain)\r\n";
- $notify_message .= "url : $comment_author_url\r\n";
- $notify_message .= "excerpt: \n".stripslashes($original_comment)."\r\n\r\n";
- $notify_message .= "You can see all trackbacks on this post there: \r\n";
- $notify_message .= "$siteurl/$blogfilename?p=$comment_post_ID&tb=1\r\n\r\n";
-
$postdata = get_postdata($comment_post_ID);
$authordata = get_userdata($postdata["Author_ID"]);
- $recipient = $authordata["user_email"];
- $subject = "trackback on post #$comment_post_ID \"".$postdata["Title"]."\"";
+ if ($comments_notify && '' != $authordata->user_email) {
- @mail($recipient, $subject, $notify_message, "From: wordpress@".$HTTP_SERVER_VARS['SERVER_NAME']."\r\n"."X-Mailer: WordPress $b2_version - PHP/" . phpversion());
-
+ $notify_message = "New trackback on your post #$comment_post_ID.\r\n\r\n";
+ $notify_message .= "Website: $comment_author (IP: $user_ip , $user_domain)\r\n";
+ $notify_message .= "URI : $comment_author_url\r\n";
+ $notify_message .= "Excerpt: \n".stripslashes($original_comment)."\r\n\r\n";
+ $notify_message .= "You can see all trackbacks on this post here: \r\n";
+ $notify_message .= "$siteurl/$blogfilename?p=$comment_post_ID&c=1\r\n\r\n";
+
+ $subject = '[' . stripslashes($blogname) . '] Trackback: "' .stripslashes($postdata['Title']).'"';
+
+ $from = "From: wordpress@".$HTTP_SERVER_VARS['SERVER_NAME'];
+ $from .= "X-Mailer: WordPress $b2_version with PHP/" . phpversion();
+
+ @mail($authordata->user_email, $subject, $notify_message, $from);
}
-
trackback_response(0);
}
-
-}/* elseif (empty($HTTP_GET_VARS['__mode'])) {
-
- header('Content-type: application/xml');
- echo "\n\n1\n";
- echo "Tell me a lie. \nOr just a __mode or url parameter ?\n";
- echo "";
-
-}*/
-
-
}
-
+}
?>
\ No newline at end of file