WordPress.org

Make WordPress Core

Changeset 13353


Ignore:
Timestamp:
02/24/2010 12:18:18 AM (8 years ago)
Author:
nacin
Message:

Don't use private wpdb vars. See #11644

Location:
trunk
Files:
2 edited

Legend:

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

    r13242 r13353  
    13831383
    13841384    $data = compact('comment_content', 'comment_author', 'comment_author_email', 'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 'comment_date_gmt');
    1385     $wpdb->update($wpdb->comments, $data, compact('comment_ID'));
    1386 
    1387     $rval = $wpdb->rows_affected;
     1385    $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) );
    13881386
    13891387    clean_comment_cache($comment_ID);
  • trunk/xmlrpc.php

    r13207 r13353  
    32043204
    32053205        // Let's check that the remote site didn't already pingback this entry
    3206         $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $post_ID, $pagelinkedfrom) );
    3207 
    3208         if ( $wpdb->num_rows ) // We already have a Pingback from this URL
    3209             return new IXR_Error(48, __('The pingback has already been registered.'));
     3206        if ( $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $post_ID, $pagelinkedfrom) ) )
     3207            return new IXR_Error( 48, __( 'The pingback has already been registered.' ) );
    32103208
    32113209        // very stupid, but gives time to the 'from' server to publish !
Note: See TracChangeset for help on using the changeset viewer.