Skip to:
Content

BuddyPress.org

Changeset 1627


Ignore:
Timestamp:
07/21/2009 11:35:09 PM (15 years ago)
Author:
apeatling
Message:

File load ordering bug fix.

File:
1 edited

Legend:

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

    r1621 r1627  
    3535    require_once( BB_PATH . BB_INC . 'class.bb-taxonomy.php' );
    3636   
    37     require_once( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' );
    38 
    3937    $bb = new stdClass();
    4038    require_once( $bp->forums->bbconfig );
     
    6664    define( 'BB_INSTALLING', false );
    6765   
     66    /* This must be loaded before functionss.bb-admin.php otherwise we get a function conflict. */
     67    if ( !$tables_installed = (boolean) $bbdb->get_results( 'DESCRIBE `' . $bbdb->forums . '`;', ARRAY_A ) )
     68        require_once( ABSPATH . 'wp-admin/upgrade-functions.php' );
     69       
     70    require_once( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' );
     71
    6872    if ( is_object( $wp_roles ) ) {
    6973        $bb_roles =& $wp_roles;
     
    8892
    8993    /* Check if the tables are installed, if not, install them */
    90     if ( !(boolean) $bbdb->get_results( 'DESCRIBE `' . $bbdb->forums . '`;', ARRAY_A ) ) {
     94    if ( !$tables_installed ) {
    9195        require_once( BB_PATH . 'bb-admin/includes/defaults.bb-schema.php' );
    92         require_once( ABSPATH . 'wp-admin/upgrade-functions.php' );
    93 
     96       
    9497        dbDelta( $bb_queries );
    9598       
Note: See TracChangeset for help on using the changeset viewer.