Skip to content

Commit

Permalink
fixes for bug WordPress#311, by bronski
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@1705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
michelvaldrighi committed Sep 22, 2004
1 parent 9367489 commit 00d3d3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions wp-includes/functions-post.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ function wp_new_comment($commentdata) {
global $wpdb; global $wpdb;
extract($commentdata); extract($commentdata);


$comment_post_id = (int) $comment_post_id; $comment_post_ID = (int) $comment_post_ID;


$comment_author = strip_tags($comment_author); $comment_author = strip_tags($comment_author);
$comment_author = htmlspecialchars($comment_author); $comment_author = htmlspecialchars($comment_author);
Expand Down Expand Up @@ -385,15 +385,15 @@ function wp_new_comment($commentdata) {
die( __('Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.') ); 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; $approved = 1;
else else
$approved = 0; $approved = 0;


$result = $wpdb->query("INSERT INTO $wpdb->comments $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)
VALUES 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') ) if ( get_option('comments_notify') )
Expand Down
6 changes: 3 additions & 3 deletions wp-trackback.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ function trackback_response($error = 0, $error_message = '') {
$blog_name = htmlspecialchars($blog_name); $blog_name = htmlspecialchars($blog_name);
$blog_name = (strlen($blog_name) > 250) ? substr($blog_name, 0, 250) . '...' : $blog_name; $blog_name = (strlen($blog_name) > 250) ? substr($blog_name, 0, 250) . '...' : $blog_name;


$comment_post_id = $tb_id; $comment_post_ID = $tb_id;
$commment_author = $blog_name; $comment_author = $blog_name;
$comment_author_email = ''; $comment_author_email = '';
$comment_author_url = $tb_url; $comment_author_url = $tb_url;
$comment_content = "<strong>$title</strong>\n\n$excerpt"; $comment_content = "<strong>$title</strong>\n\n$excerpt";
$comment_type = 'trackback'; $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); wp_new_comment($commentdata);


Expand Down

0 comments on commit 00d3d3f

Please sign in to comment.