Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/10/2011 02:33:34 PM (14 years ago)
Author:
boonebgorges
Message:

Check to see that the blog setup routine has run on admin loads. Fixes #3179

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-functions.php

    r4309 r4344  
    292292    if ( isset( $bp->maintenence_mode ) )
    293293        return;
     294
     295    /**
     296     * Check to make sure that the blog setup routine has run. This can't happen during the
     297     * wizard because of the order which the components are loaded
     298     */
     299    if ( bp_is_active( 'blogs' ) ) {
     300        $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$bp->blogs->table_name}" ) );
     301       
     302        if ( !$count )
     303            bp_blogs_record_existing_blogs();
     304    }
    294305
    295306    /**
Note: See TracChangeset for help on using the changeset viewer.