From 802bd72016472df2ecf4d2017ae038b9411f6310 Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Mon, 27 Sep 2004 11:45:15 +0000 Subject: [PATCH] whoops, we forgot to store the comment_type git-svn-id: http://svn.automattic.com/wordpress/trunk@1716 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions-post.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index d66e1918d..9c078a6df 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -377,6 +377,10 @@ function wp_new_comment($commentdata) { $now_gmt = current_time('mysql', 1); $user_agent = addslashes($_SERVER['HTTP_USER_AGENT']); + if ( (!isset($comment_type)) || (($comment_type != 'trackback') && ($comment_type != 'pingback')) ) { + $comment_type = ''; + } + // Simple flood-protection if ( $lasttime = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_author_IP = '$user_ip' ORDER BY comment_date DESC LIMIT 1") ) { $time_lastcomment= mysql2date('U', $lasttime); @@ -391,9 +395,9 @@ function wp_new_comment($commentdata) { $approved = 0; $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) + (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, comment_type) VALUES - ('$comment_post_ID', '$comment_author', '$comment_author_email', '$comment_author_url', '$user_ip', '$now', '$now_gmt', '$comment_content', '$approved', '$user_agent') + ('$comment_post_ID', '$comment_author', '$comment_author_email', '$comment_author_url', '$user_ip', '$now', '$now_gmt', '$comment_content', '$approved', '$user_agent', '$comment_type') "); if ( get_option('comments_notify') )