[wp-cvs] wordpress/wp-includes comment-functions.php,1.16,1.17
Ryan Boren
rboren at users.sourceforge.net
Fri Jan 21 03:33:15 GMT 2005
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23328
Modified Files:
comment-functions.php
Log Message:
Fix whitelist. Bug 664.
Index: comment-functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/comment-functions.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** comment-functions.php 21 Jan 2005 00:38:04 -0000 1.16
--- comment-functions.php 21 Jan 2005 03:33:13 -0000 1.17
***************
*** 727,735 ****
// Comment whitelisting:
if ( 1 == get_settings('comment_whitelist')) {
- if( $author != '' && $email != '' ) {
- $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' ");
- if ( 1 == $ok_to_comment && false === strpos( $email, get_settings('moderation_keys')) )
- return true;
- }
if ( 'trackback' == $comment_type || 'pingback' == $comment_type ) { // check if domain is in blogroll
$uri = parse_url($url);
--- 727,730 ----
***************
*** 738,741 ****
--- 733,744 ----
if ( $in_blogroll )
return true;
+ } elseif( $author != '' && $email != '' ) {
+ $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' ");
+ if ( 1 == $ok_to_comment && false === strpos( $email, get_settings('moderation_keys')) )
+ return true;
+ else
+ return false;
+ } else {
+ return false;
}
}
More information about the cvs
mailing list