Changes from trunk/wp-includes/comment.php at r13995 to branches/3.0/wp-includes/comment.php at r16638
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/wp-includes/comment.php
r13995 r16638 19 19 * then the check fails. 20 20 * 21 * If the comment is a trackback and part of the blogroll, then the trackback is 22 * automatically whitelisted. If the comment author was approved before, then 23 * the comment is automatically whitelisted. 21 * If the comment author was approved before, then the comment is 22 * automatically whitelisted. 24 23 * 25 24 * If none of the checks fail, then the failback is to set the check to pass … … 81 80 // Comment whitelisting: 82 81 if ( 1 == get_option('comment_whitelist')) { 83 if ( 'trackback' == $comment_type || 'pingback' == $comment_type ) { // check if domain is in blogroll 84 $uri = parse_url($url); 85 $domain = $uri['host']; 86 $uri = parse_url( home_url() ); 87 $home_domain = $uri['host']; 88 if ( $wpdb->get_var($wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_url LIKE (%s) LIMIT 1", '%'.$domain.'%')) || $domain == $home_domain ) 89 return true; 90 else 91 return false; 92 } elseif ( $author != '' && $email != '' ) { 82 if ( 'trackback' != $comment_type && 'pingback' != $comment_type && $author != '' && $email != '' ) { 93 83 // expected_slashed ($author, $email) 94 84 $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' LIMIT 1"); … … 1655 1645 $pinged[] = $tb_ping; 1656 1646 } else { 1657 $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, '$tb_ping', '')) WHERE ID = %d", $post_id) );1647 $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, %s, '')) WHERE ID = %d", $tb_ping, $post_id) ); 1658 1648 } 1659 1649 }
Note: See TracChangeset
for help on using the changeset viewer.