Skip to:
Content

BuddyPress.org

Changeset 2274


Ignore:
Timestamp:
01/06/2010 09:24:41 PM (16 years ago)
Author:
apeatling
Message:

Change multiblog naming convention to multisite to avoid future confusion.

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs.php

    r2252 r2274  
    7575    global $wpdb, $bp, $userdata;
    7676
    77     if ( is_site_admin() && bp_core_is_multiblog_install() ) {
     77    if ( is_site_admin() && bp_core_is_multisite() ) {
    7878        /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */
    7979        if ( get_site_option('bp-blogs-db-version') < BP_BLOGS_DB_VERSION )
     
    124124    /* Blog/post/comment menus should not appear on single WordPress setups. Although comments
    125125       and posts made by users will still show on their activity stream .*/
    126     if ( !bp_core_is_multiblog_install() )
     126    if ( !bp_core_is_multisite() )
    127127        return false;
    128128
     
    158158    global $bp;
    159159
    160     if ( bp_core_is_multiblog_install() && $bp->current_component == $bp->blogs->slug && empty( $bp->current_action ) ) {
     160    if ( bp_core_is_multisite() && $bp->current_component == $bp->blogs->slug && empty( $bp->current_action ) ) {
    161161        $bp->is_directory = true;
    162162
     
    179179    global $bp;
    180180
    181     if ( !bp_core_is_multiblog_install() )
     181    if ( !bp_core_is_multisite() )
    182182        return false;
    183183
     
    199199    global $bp;
    200200
    201     if ( !bp_core_is_multiblog_install() || $bp->current_component != $bp->blogs->slug || 'create' != $bp->current_action )
     201    if ( !bp_core_is_multisite() || $bp->current_component != $bp->blogs->slug || 'create' != $bp->current_action )
    202202        return false;
    203203
     
    362362
    363363            /* If we're on a multiblog install, record this post */
    364             if ( bp_core_is_multiblog_install() ) {
     364            if ( bp_core_is_multisite() ) {
    365365                $recorded_post = new BP_Blogs_Post;
    366366                $recorded_post->user_id = $user_id;
     
    374374            }
    375375
    376             if ( (int)get_blog_option( $blog_id, 'blog_public' ) || !bp_core_is_multiblog_install() ) {
     376            if ( (int)get_blog_option( $blog_id, 'blog_public' ) || !bp_core_is_multisite() ) {
    377377                /* Record this in activity streams */
    378378                $post_permalink = bp_post_get_permalink( $post, $blog_id );
     
    411411        }
    412412
    413         if ( (int)get_blog_option( $blog_id, 'blog_public' ) || !bp_core_is_multiblog_install() ) {
     413        if ( (int)get_blog_option( $blog_id, 'blog_public' ) || !bp_core_is_multisite() ) {
    414414            /* Now re-record the post in the activity streams */
    415415            $post_permalink = bp_post_get_permalink( $post, $blog_id );
     
    455455
    456456    /* If we're on a multiblog install, record this post */
    457     if ( bp_core_is_multiblog_install() ) {
     457    if ( bp_core_is_multisite() ) {
    458458        $recorded_comment = new BP_Blogs_Comment;
    459459        $recorded_comment->user_id = $user_id;
     
    468468    }
    469469
    470     if ( (int)get_blog_option( $recorded_comment->blog_id, 'blog_public' ) || !bp_core_is_multiblog_install() ) {
     470    if ( (int)get_blog_option( $recorded_comment->blog_id, 'blog_public' ) || !bp_core_is_multisite() ) {
    471471        /* Record in activity streams */
    472472        $comment_link = bp_post_get_permalink( $comment->post, $wpdb->blogid ) . '#comment-' . $comment_id;
     
    502502    bp_blogs_delete_activity( array( 'item_id' => $comment_id, 'secondary_item_id' => $recorded_comment->blog_id, 'component_name' => $bp->blogs->slug, 'component_action' => 'new_blog_comment' ) );
    503503
    504     if ( (int)get_blog_option( $recorded_comment->blog_id, 'blog_public' ) || !bp_core_is_multiblog_install() ) {
     504    if ( (int)get_blog_option( $recorded_comment->blog_id, 'blog_public' ) || !bp_core_is_multisite() ) {
    505505        /* Record in activity streams */
    506506        $comment_link = bp_post_get_permalink( $comment->post, $recorded_comment->blog_id );
  • trunk/bp-core.php

    r2249 r2274  
    427427
    428428        /* Get the functions file */
    429         if ( file_exists( ABSPATH . 'wp-admin/includes/mu.php' ) && bp_core_is_multiblog_install() )
     429        if ( file_exists( ABSPATH . 'wp-admin/includes/mu.php' ) && bp_core_is_multisite() )
    430430            require( ABSPATH . 'wp-admin/includes/mu.php' );
    431431
     
    451451
    452452        /* Finally, mark this user as a spammer */
    453         if ( bp_core_is_multiblog_install() )
     453        if ( bp_core_is_multisite() )
    454454            $wpdb->update( $wpdb->users, array( 'spam' => $is_spam ), array( 'ID' => $bp->displayed_user->id ) );
    455455
     
    11931193    global $wpdb;
    11941194
    1195     if ( bp_core_is_multiblog_install() )
     1195    if ( bp_core_is_multisite() )
    11961196        $is_spammer = (int) $wpdb->get_var( $wpdb->prepare( "SELECT spam FROM " . CUSTOM_USER_TABLE . " WHERE ID = %d", $user_id ) );
    11971197    else
     
    14771477    global $bp, $current_site;
    14781478
    1479     if ( bp_core_is_multiblog_install() )
     1479    if ( bp_core_is_multisite() )
    14801480        $site_path = $current_site->path;
    14811481    else {
  • trunk/bp-core/bp-core-activation.php

    r2258 r2274  
    44    global $bp, $wpdb;
    55
    6     if ( !bp_core_is_multiblog_install() || BP_ACTIVATION_SLUG != $bp->current_component )
     6    if ( !bp_core_is_multisite() || BP_ACTIVATION_SLUG != $bp->current_component )
    77        return false;
    88
  • trunk/bp-core/bp-core-adminbar.php

    r2246 r2274  
    249249            <?php endif; ?>
    250250
    251             <?php if ( function_exists('bp_blogs_install') && bp_core_is_multiblog_install() ) : ?>
     251            <?php if ( function_exists('bp_blogs_install') && bp_core_is_multisite() ) : ?>
    252252            <li><a href="<?php echo $bp->root_domain . '/' . $bp->blogs->slug . '/?random-blog' ?>"><?php _e( 'Random Blog', 'buddypress' ) ?></a></li>
    253253
     
    264264add_action( 'bp_adminbar_menus', 'bp_adminbar_account_menu', 4 );
    265265
    266 if ( bp_core_is_multiblog_install() )
     266if ( bp_core_is_multisite() )
    267267    add_action( 'bp_adminbar_menus', 'bp_adminbar_blogs_menu', 6 );
    268268
    269269add_action( 'bp_adminbar_menus', 'bp_adminbar_notifications_menu', 8 );
    270270
    271 if ( bp_core_is_multiblog_install() )
     271if ( bp_core_is_multisite() )
    272272    add_action( 'bp_adminbar_menus', 'bp_adminbar_authors_menu', 12 );
    273273
  • trunk/bp-core/bp-core-avatars.php

    r2255 r2274  
    369369
    370370function bp_core_avatar_upload_path() {
    371     if ( bp_core_is_multiblog_install() )
     371    if ( bp_core_is_multisite() )
    372372        $path = ABSPATH . get_blog_option( BP_ROOT_BLOG, 'upload_path' );
    373373    else {
  • trunk/bp-core/bp-core-catchuri.php

    r2209 r2274  
    3333    global $bp, $current_blog;
    3434
    35     if ( !defined( 'BP_ENABLE_MULTIBLOG' ) && bp_core_is_multiblog_install() ) {
     35    if ( !defined( 'BP_ENABLE_MULTIBLOG' ) && bp_core_is_multisite() ) {
    3636        /* Only catch URI's on the root blog if we are not running BP on multiple blogs */
    3737        if ( BP_ROOT_BLOG != (int) $current_blog->blog_id )
  • trunk/bp-core/bp-core-signup.php

    r2209 r2274  
    125125
    126126                /* Finally, sign up the user and/or blog*/
    127                 if ( isset( $_POST['signup_with_blog'] ) && bp_core_is_multiblog_install() )
     127                if ( isset( $_POST['signup_with_blog'] ) && bp_core_is_multisite() )
    128128                    wpmu_signup_blog( $blog_details['domain'], $blog_details['path'], $blog_details['blog_title'], $_POST['signup_username'], $_POST['signup_email'], $usermeta );
    129129                else {
     
    149149        $bp->signup->step = 'completed-confirmation';
    150150
    151         if ( bp_core_is_multiblog_install() ) {
     151        if ( bp_core_is_multisite() ) {
    152152            /* Get the activation key */
    153153            if ( !$bp->signup->key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $_POST[ 'signup_username' ], $_POST[ 'signup_email' ] ) ) ) {
     
    192192    global $bp;
    193193
    194     if ( bp_core_is_multiblog_install() )
     194    if ( bp_core_is_multisite() )
    195195        return wpmu_signup_user( $user_login, $user_email, $usermeta );
    196196
  • trunk/bp-core/bp-core-templatetags.php

    r2273 r2274  
    12351235}
    12361236    function bp_get_signup_allowed() {
    1237         if ( bp_core_is_multiblog_install() )
     1237        if ( bp_core_is_multisite() )
    12381238            return get_site_option( 'registration' );
    12391239        else {
     
    12521252
    12531253function bp_registration_needs_activation() {
    1254     return apply_filters( 'bp_registration_needs_activation', bp_core_is_multiblog_install() );
     1254    return apply_filters( 'bp_registration_needs_activation', bp_core_is_multisite() );
    12551255}
    12561256
  • trunk/bp-core/bp-core-wpabstraction.php

    r2218 r2274  
    1010 */
    1111
    12 if ( !bp_core_is_multiblog_install() ) {
     12if ( !bp_core_is_multisite() ) {
    1313    $wpdb->base_prefix = $wpdb->prefix;
    1414    $wpdb->blogid = 1;
    1515}
    1616
    17 function bp_core_is_multiblog_install() {
     17function bp_core_is_multisite() {
     18    if ( function_exists( 'is_multisite' ) )
     19        return is_multisite();
     20
    1821    if ( !function_exists( 'wpmu_signup_blog' ) )
    1922        return false;
     
    2326
    2427function bp_core_get_status_sql( $prefix = false ) {
    25     if ( !bp_core_is_multiblog_install() )
     28    if ( !bp_core_is_multisite() )
    2629        return "{$prefix}user_status = 0";
    2730    else
  • trunk/bp-forums/bp-forums-admin.php

    r2209 r2274  
    159159    $file .= "\n" .   '$bb->name = "' . get_blog_option( BP_ROOT_BLOG, 'name' ) . ' ' . __( 'Forums', 'buddypress' ) . '";';
    160160
    161     if ( bp_core_is_multiblog_install() )
     161    if ( bp_core_is_multisite() )
    162162        $file .= "\n" .   '$bb->wordpress_mu_primary_blog_id = ' . BP_ROOT_BLOG . ';';
    163163
  • trunk/bp-themes/bp-default/footer.php

    r2209 r2274  
    55
    66        <div id="footer">
    7             <?php if ( bp_core_is_multiblog_install() ) : ?>
     7            <?php if ( bp_core_is_multisite() ) : ?>
    88                <p><?php printf( __( '%s is proudly powered by <a href="http://mu.wordpress.org">WordPress MU</a> and <a href="http://buddypress.org">BuddyPress</a>', 'buddypress' ), bloginfo('name') ); ?></p>
    99            <?php else : ?>
  • trunk/bp-themes/bp-default/header.php

    r2270 r2274  
    7575                <?php endif; ?>
    7676
    77                 <?php if ( function_exists( 'bp_blogs_install' ) && bp_core_is_multiblog_install() ) : ?>
     77                <?php if ( function_exists( 'bp_blogs_install' ) && bp_core_is_multisite() ) : ?>
    7878                    <li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
    7979                        <a href="<?php echo site_url() ?>/<?php echo BP_BLOGS_SLUG ?>/" title="<?php _e( 'Blogs', 'buddypress' ) ?>"><?php _e( 'Blogs', 'buddypress' ) ?></a>
  • trunk/bp-themes/bp-default/registration/register.php

    r2209 r2274  
    161161                <?php do_action( 'bp_after_signup_profile_fields' ) ?>
    162162
    163                 <?php if ( bp_core_is_multiblog_install() && 'all' == bp_get_signup_allowed() || 'blog' == bp_get_signup_allowed() ) : ?>
     163                <?php if ( bp_core_is_multisite() && 'all' == bp_get_signup_allowed() || 'blog' == bp_get_signup_allowed() ) : ?>
    164164
    165165                    <?php do_action( 'bp_before_blog_details_fields' ) ?>
Note: See TracChangeset for help on using the changeset viewer.