WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/10/2014 12:43:32 AM (7 years ago)
Author:
wonderboymusic
Message:

Replace all uses of like_escape() with $wpdb->esc_like().

Props miqrogroove.
See #10041.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network.php

    r28497 r28712  
    4040function network_domain_check() {
    4141    global $wpdb;
    42     if ( $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) )
     42
     43    $sql = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->site ) );
     44    if ( $wpdb->get_var( $sql ) ) {
    4345        return $wpdb->get_var( "SELECT domain FROM $wpdb->site ORDER BY id ASC LIMIT 1" );
     46    }
    4447    return false;
    4548}
Note: See TracChangeset for help on using the changeset viewer.