[wp-cvs] wordpress wp-comments-post.php,1.11.4.3,1.11.4.4
Ryan Boren
rboren at users.sourceforge.net
Sat Nov 27 23:04:10 UTC 2004
Update of /cvsroot/cafelog/wordpress
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21867
Modified Files:
Tag: WordPress-Ver-1_2-Branch
wp-comments-post.php
Log Message:
Do not allow commenting against non-existent posts. Port from 1.3.
Index: wp-comments-post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-comments-post.php,v
retrieving revision 1.11.4.3
retrieving revision 1.11.4.4
diff -C2 -d -r1.11.4.3 -r1.11.4.4
*** wp-comments-post.php 12 Oct 2004 21:11:34 -0000 1.11.4.3
--- wp-comments-post.php 27 Nov 2004 23:04:06 -0000 1.11.4.4
***************
*** 33,38 ****
$user_ip = $_SERVER['REMOTE_ADDR'];
! if ( 'closed' == $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = '$comment_post_ID'") )
die( __('Sorry, comments are closed for this item.') );
if ( get_settings('require_name_email') && ('' == $email || '' == $author) )
--- 33,45 ----
$user_ip = $_SERVER['REMOTE_ADDR'];
!
! $post_status = $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = '$comment_post_ID'");
!
! if ( empty($post_status) ) {
! // Post does not exist. Someone is trolling. Die silently.
! die();
! } else if ( 'closed' == $post_status ) {
die( __('Sorry, comments are closed for this item.') );
+ }
if ( get_settings('require_name_email') && ('' == $email || '' == $author) )
More information about the cvs
mailing list