Ticket #21143: 21143_2.diff

File 21143_2.diff, 949 bytes (added by jamescollins, 8 months ago)
Line 
1Index: ms-settings.php
2===================================================================
3--- ms-settings.php     (revision 21996)
4+++ ms-settings.php     (working copy)
5@@ -49,6 +49,7 @@
6        if ( ! isset( $current_site->blog_id ) )
7                $current_site->blog_id = $wpdb->get_var( $wpdb->prepare( "SELECT blog_id FROM $wpdb->blogs WHERE domain = %s AND path = %s", $current_site->domain, $current_site->path ) );
8 
9+       $blogname = null;
10        if ( is_subdomain_install() ) {
11                $current_blog = wp_cache_get( 'current_blog_' . $domain, 'site-options' );
12                if ( !$current_blog ) {
13@@ -80,6 +81,10 @@
14                unset($reserved_blognames);
15        }
16 
17+       if ( ! defined( 'WP_INSTALLING' ) && ! is_object( $current_blog ) ) {
18+               do_action('blog_not_found', $domain, $path, $blogname, $current_site );
19+       }
20+
21        if ( ! defined( 'WP_INSTALLING' ) && is_subdomain_install() && ! is_object( $current_blog ) ) {
22                if ( defined( 'NOBLOGREDIRECT' ) ) {
23                        $destination = NOBLOGREDIRECT;