From 00d3d3fec960c91751ec8ca06f68025459d5dc5e Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Wed, 22 Sep 2004 19:44:35 +0000 Subject: [PATCH] fixes for bug #311, by bronski git-svn-id: http://svn.automattic.com/wordpress/trunk@1705 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions-post.php | 6 +++--- wp-trackback.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index d62152fd3a..d66e1918d8 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -356,7 +356,7 @@ function wp_new_comment($commentdata) { global $wpdb; extract($commentdata); - $comment_post_id = (int) $comment_post_id; + $comment_post_ID = (int) $comment_post_ID; $comment_author = strip_tags($comment_author); $comment_author = htmlspecialchars($comment_author); @@ -385,7 +385,7 @@ function wp_new_comment($commentdata) { die( __('Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.') ); } - if( check_comment($author, $email, $url, $comment, $user_ip, $user_agent) ) + if( check_comment($comment_author, $comment_author_email, $comment_author_url, $comment_content, $user_ip, $user_agent) ) $approved = 1; else $approved = 0; @@ -393,7 +393,7 @@ function wp_new_comment($commentdata) { $result = $wpdb->query("INSERT INTO $wpdb->comments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved, comment_agent) VALUES - ('$comment_post_ID', '$author', '$email', '$tb_url', '$user_ip', '$now', '$now_gmt', '$comment', '$approved', '$user_agent') + ('$comment_post_ID', '$comment_author', '$comment_author_email', '$comment_author_url', '$user_ip', '$now', '$now_gmt', '$comment_content', '$approved', '$user_agent') "); if ( get_option('comments_notify') ) diff --git a/wp-trackback.php b/wp-trackback.php index a9f871a80c..9113043e78 100644 --- a/wp-trackback.php +++ b/wp-trackback.php @@ -62,14 +62,14 @@ if ( !empty($tb_url) && !empty($title) && !empty($tb_url) ) { $blog_name = htmlspecialchars($blog_name); $blog_name = (strlen($blog_name) > 250) ? substr($blog_name, 0, 250) . '...' : $blog_name; - $comment_post_id = $tb_id; - $commment_author = $blog_name; + $comment_post_ID = $tb_id; + $comment_author = $blog_name; $comment_author_email = ''; $comment_author_url = $tb_url; $comment_content = "$title\n\n$excerpt"; $comment_type = 'trackback'; - $commentdata = compact('comment_post_id', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type'); + $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type'); wp_new_comment($commentdata);