Ticket #17376: 17376.3.diff
File 17376.3.diff, 1.4 KB (added by , 8 years ago) |
---|
-
src/wp-includes/ms-load.php
348 348 // If persistent caching is enabled, we could query the DB for a path <> '/' 349 349 // then cache whether we can just always ignore paths. 350 350 351 if ( count( $paths ) > 1 ) { 351 // Look for all possible paths unless wp-admin is part of the request. At that 352 // point, an exact match should be made from the first path segment tested. 353 if ( count( $paths ) > 1 && ! is_admin() ) { 352 354 $paths = "'" . implode( "', '", $wpdb->_escape( $paths ) ) . "'"; 353 355 $sql = $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE domain = %s", $domain ); 354 356 $sql .= " AND path IN ($paths) ORDER BY CHAR_LENGTH(path) DESC LIMIT 1"; -
src/wp-includes/ms-settings.php
153 153 if ( 0 !== strcasecmp( $current_site->domain, $domain ) ) { 154 154 header( 'Location: http://' . $current_site->domain . $current_site->path ); 155 155 exit; 156 } elseif ( is_admin() ) { 157 header( 'Location: http://' . $current_site->domain . $current_site->path . '/wp-admin' ); 158 exit; 156 159 } 157 160 ms_not_installed(); 158 161 }