Ticket #21143: 21143.diff
File 21143.diff, 2.0 KB (added by , 11 years ago) |
---|
-
src/wp-includes/ms-settings.php
130 130 } 131 131 } 132 132 133 if ( defined( 'WP_INSTALLING' ) && empty( $current_blog ) ) { 134 $current_blog->blog_id = $blog_id = 1; 135 } 136 133 137 // If we haven't figured out our site, give up. 134 138 if ( empty( $current_blog ) ) { 135 if ( defined( 'WP_INSTALLING' ) ) { 136 $current_blog->blog_id = $blog_id = 1; 137 138 } elseif ( is_subdomain_install() ) { 139 if ( is_subdomain_install() ) { 139 140 // @todo This is only for an open registration subdomain network. 140 141 if ( defined( 'NOBLOGREDIRECT' ) ) { 141 142 if ( '%siteurl%' === NOBLOGREDIRECT ) { 142 $destination = "http://". $current_site->domain . $current_site->path;143 $destination = 'http://' . $current_site->domain . $current_site->path; 143 144 } else { 144 145 $destination = NOBLOGREDIRECT; 145 146 } … … 146 147 } else { 147 148 $destination = 'http://' . $current_site->domain . $current_site->path . 'wp-signup.php?new=' . str_replace( '.' . $current_site->domain, '', $domain ); 148 149 } 149 header( 'Location: ' . $destination );150 exit;151 152 150 } else { 153 151 if ( 0 !== strcasecmp( $current_site->domain, $domain ) ) { 154 header( 'Location: http://' . $current_site->domain . $current_site->path ); 155 exit; 152 $destination = 'http://' . $current_site->domain . $current_site->path; 153 } else { 154 ms_not_installed(); // Uses wp_die(); 156 155 } 157 ms_not_installed();158 156 } 157 158 /** 159 * Fires before redirect when a site cannot be found to fill $current_blog. 160 * 161 * @since 3.9.0 162 * 163 * @param string $destination Current destination URL for redirect. 164 * @param string $domain Originally requested domain. 165 * @param string $path Originally requested path. 166 */ 167 do_action( 'site_not_found', $destination, $domain, $path ); 168 169 header( 'Location: ' . $destination ); 170 exit; 159 171 } 160 172 161 173 $blog_id = $current_blog->blog_id;