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

Props miqrogroove.
See #10041.


git-svn-id: https://develop.svn.wordpress.org/trunk@28712 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-06-10 00:43:32 +00:00
parent 2a551f57a4
commit 84ad12b439
19 changed files with 122 additions and 76 deletions
+4 -1
View File
@@ -39,8 +39,11 @@ foreach ( $wpdb->tables( 'ms_global' ) as $table => $prefixed_table )
*/
function network_domain_check() {
global $wpdb;
if ( $wpdb->get_var( "SHOW TABLES LIKE '$wpdb->site'" ) )
$sql = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->site ) );
if ( $wpdb->get_var( $sql ) ) {
return $wpdb->get_var( "SELECT domain FROM $wpdb->site ORDER BY id ASC LIMIT 1" );
}
return false;
}