WordPress.org

Make WordPress Core

Ticket #20494: comment_exists_light.patch

File comment_exists_light.patch, 815 bytes (added by momo360modena, 6 years ago)

Bugfix

  • wp-admin/includes/comment.php

    ### Eclipse Workspace Patch 1.0
    #P WP.org WordPress Trunk
     
    77 */
    88
    99/**
    10  * {@internal Missing Short Description}}
     10 * Determine if a comment exists based on author and date
    1111 *
    1212 * @since 2.0.0
    1313 * @uses $wpdb
     
    2222        $comment_author = stripslashes($comment_author);
    2323        $comment_date = stripslashes($comment_date);
    2424
    25         return $wpdb->get_var( $wpdb->prepare("SELECT comment_post_ID FROM $wpdb->comments
     25        return $wpdb->get_var( $wpdb->prepare("SELECT comment_ID FROM $wpdb->comments
    2626                        WHERE comment_author = %s AND comment_date = %s", $comment_author, $comment_date) );
    2727}
    2828