mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-04 18:01:42 +01:00
use correct var in r14342, see #13104
git-svn-id: http://svn.automattic.com/wordpress/trunk@14343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
709ed743e5
commit
e2f361cea4
@ -106,9 +106,9 @@ function get_blog_details( $fields, $get_all = true ) {
|
|||||||
$blog = wp_cache_get($key, 'blog-lookup');
|
$blog = wp_cache_get($key, 'blog-lookup');
|
||||||
if ( false !== $blog )
|
if ( false !== $blog )
|
||||||
return $blog;
|
return $blog;
|
||||||
if ( substr( $domain, 0, 4 ) == 'www.' ) {
|
if ( substr( $fields['domain'], 0, 4 ) == 'www.' ) {
|
||||||
$nowww = substr( $domain, 4 );
|
$nowww = substr( $fields['domain'], 4 );
|
||||||
$blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain IN (%s,%s) ORDER BY CHAR_LENGTH(domain) DESC", $nowww, $fields['domain'], $fields['path'] ) );
|
$blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain IN (%s,%s) ORDER BY CHAR_LENGTH(domain) DESC", $nowww, $fields['domain'] ) );
|
||||||
} else {
|
} else {
|
||||||
$blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain = %s", $fields['domain'] ) );
|
$blog = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain = %s", $fields['domain'] ) );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user