Skip to:
Content

BuddyPress.org

Changeset 4438


Ignore:
Timestamp:
05/29/2011 11:22:47 AM (14 years ago)
Author:
djpaul
Message:

Correct domain when user creates a new site through bp-blogs, in a subdomain setup. Fixes #1796

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-template.php

    r4389 r4438  
    482482
    483483function bp_blogs_validate_blog_signup() {
    484     global $wpdb, $current_user, $blogname, $blog_title, $errors, $domain, $path;
     484    global $wpdb, $current_user, $blogname, $blog_title, $errors, $domain, $path, $current_site;
    485485
    486486    if ( !check_admin_referer( 'bp_blog_signup_form' ) )
     
    506506    $meta = apply_filters( 'add_signup_meta', $meta );
    507507
    508     /* If this is a VHOST install, remove the username from the domain as we are setting this blog
    509        up inside a user domain, not the root domain. */
     508    // If this is a subdomain install, set up the site inside the root domain.
     509    if ( is_subdomain_install() )
     510        $domain = $blogname . '.' . preg_replace( '|^www\.|', '', $current_site->domain );
    510511
    511512    wpmu_create_blog( $domain, $path, $blog_title, $current_user->id, $meta, $wpdb->siteid );
Note: See TracChangeset for help on using the changeset viewer.