Skip to:
Content

BuddyPress.org

Changeset 1652


Ignore:
Timestamp:
08/11/2009 11:23:45 PM (15 years ago)
Author:
apeatling
Message:

re-patching r1627 as it was lost in a later revision. Props junsuijin. Fixes #918

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums/bp-forums-bbpress.php

    r1636 r1652  
    4040    require_once( BB_PATH . BB_INC . 'class.bb-taxonomy.php' );
    4141   
    42     require_once( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' );
    43 
    4442    $bb = new stdClass();
    4543    require_once( $bp->forums->bbconfig );
     
    7068
    7169    define( 'BB_INSTALLING', false );
     70
     71    /* This must be loaded before functionss.bb-admin.php otherwise we get a function conflict. */
     72    if ( !$tables_installed = (boolean) $bbdb->get_results( 'DESCRIBE `' . $bbdb->forums . '`;', ARRAY_A ) )
     73        require_once( ABSPATH . 'wp-admin/upgrade-functions.php' );
     74       
     75    require_once( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' );
     76
    7277   
    7378    if ( is_object( $wp_roles ) ) {
     
    9297        $bb->site_id = BP_ROOT_BLOG;
    9398
     99
    94100    /* Check if the tables are installed, if not, install them */
    95     if ( !(boolean) $bbdb->get_results( 'DESCRIBE `' . $bbdb->forums . '`;', ARRAY_A ) ) {
     101    if ( !$tables_installed ) {
    96102        require_once( BB_PATH . 'bb-admin/includes/defaults.bb-schema.php' );
    97         require_once( ABSPATH . 'wp-admin/upgrade-functions.php' );
    98103
    99104        dbDelta( $bb_queries );
Note: See TracChangeset for help on using the changeset viewer.