Make WordPress Core

Changeset 2531


Ignore:
Timestamp:
04/13/2005 04:50:13 PM (19 years ago)
Author:
ryan
Message:

LIMIT 1 in the whitelist query. Props: Brian Dupuis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-functions.php

    r2522 r2531  
    658658                return false;
    659659        } elseif( $author != '' && $email != '' ) {
    660             $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' ");
     660            $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");
    661661            if ( 1 == $ok_to_comment && false === strpos( $email, get_settings('moderation_keys')) )
    662662                return true;
Note: See TracChangeset for help on using the changeset viewer.