diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-07-16 14:06:33 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-07-16 14:06:33 +0000 |
commit | 213933071163d6ab88c7175c9b41ffdad1622579 (patch) | |
tree | 9d830b8e6264b4e79f7b3deaff2ee566ea29bc7e /wpmu-settings.php | |
parent | c87e77c0105ba9e503f2cb69fdc72c54c0420a10 (diff) | |
download | wordpress-mu-213933071163d6ab88c7175c9b41ffdad1622579.tar.gz wordpress-mu-213933071163d6ab88c7175c9b41ffdad1622579.tar.xz wordpress-mu-213933071163d6ab88c7175c9b41ffdad1622579.zip |
Don't redirect main blog 404s and unknown blogs to signup page by default.
Added "is_main_blog()" function
Redirect to NOBLOGREDIRECT on main blog 404 and unknown blog if that constant set, fixes #677
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1377 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wpmu-settings.php')
-rw-r--r-- | wpmu-settings.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/wpmu-settings.php b/wpmu-settings.php index 838c96b..3b52a02 100644 --- a/wpmu-settings.php +++ b/wpmu-settings.php @@ -103,12 +103,7 @@ if( constant( 'VHOST' ) == 'yes' ) { if( defined( "WP_INSTALLING" ) == false ) {
if( $current_site && $current_blog == null ) {
- if( defined( 'NOBLOGREDIRECT' ) && constant( 'NOBLOGREDIRECT' ) != '' ) {
- header( "Location: " . constant( 'NOBLOGREDIRECT' ) . "?new=" . urlencode( $blogname ) );
- } else {
- header( "Location: http://{$current_site->domain}{$current_site->path}wp-signup.php?new=" . urlencode( $blogname ) );
- }
- die();
+ $current_blog = $wpdb->get_row("SELECT * FROM {$wpdb->blogs} WHERE domain = '{$current_site->domain}' AND path = '{$current_site->path}'");
}
if( $current_blog == false || $current_site == false )
is_installed();
|