Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/02/2009 06:56:42 PM (17 years ago)
Author:
apeatling
Message:

Merging last few trunk changes and stripping all whitespace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1/bp-forums/bp-forums-bbpress.php

    r1905 r2076  
    55        global $bb, $bbdb, $bb_table_prefix, $bb_current_user;
    66        global $bb_roles, $wp_taxonomy_object;
    7        
     7
    88        /* Return if we've already run this function. */
    99        if ( is_object( $bbdb ) && is_object( $bb_roles ) )
    1010                return;
    11        
     11
    1212        if ( !bp_forums_is_installed_correctly() )
    1313                return false;
    14        
     14
    1515        define( 'BB_PATH', BP_PLUGIN_DIR . '/bp-forums/bbpress/' );
    1616        define( 'BACKPRESS_PATH', BP_PLUGIN_DIR . '/bp-forums/bbpress/bb-includes/backpress/' );
    … …  
    2020        require_once( BB_PATH . BB_INC . 'class.bb-query.php' );
    2121        require_once( BB_PATH . BB_INC . 'class.bb-walker.php' );
    22        
     22
    2323        require_once( BB_PATH . BB_INC . 'functions.bb-core.php' );
    2424        require_once( BB_PATH . BB_INC . 'functions.bb-forums.php' );
    … …  
    3131        require_once( BB_PATH . BB_INC . 'functions.bb-formatting.php' );
    3232        require_once( BB_PATH . BB_INC . 'functions.bb-template.php' );
    33        
     33
    3434        require_once( BACKPRESS_PATH . 'class.wp-taxonomy.php' );
    3535        require_once( BB_PATH . BB_INC . 'class.bb-taxonomy.php' );
    36        
     36
    3737        $bb = new stdClass();
    3838        require_once( $bp->forums->bbconfig );
    … …  
    4040        // Setup the global database connection
    4141        $bbdb = new BPDB ( BBDB_USER, BBDB_PASSWORD, BBDB_NAME, BBDB_HOST );
    42        
     42
    4343        /* Set the table names */
    4444        $bbdb->forums = $bb_table_prefix . 'forums';
    … …  
    4949        $bbdb->term_taxonomy = $bb_table_prefix . 'term_taxonomy';
    5050        $bbdb->topics = $bb_table_prefix . 'topics';
    51        
     51
    5252        if ( isset( $bb->custom_user_table ) )
    5353                $bbdb->users = $bb->custom_user_table;
    5454        else
    5555                $bbdb->users = $wpdb->users;
    56        
     56
    5757        if ( isset( $bb->custom_user_meta_table ) )
    5858                $bbdb->usermeta = $bb->custom_user_meta_table;
    5959        else
    6060                $bbdb->usermeta = $wpdb->usermeta;
    61                
     61
    6262        $bbdb->prefix = $bb_table_prefix;
    6363
    … …  
    6767        if ( !$tables_installed = (boolean) $bbdb->get_results( 'DESCRIBE `' . $bbdb->forums . '`;', ARRAY_A ) )
    6868                require_once( ABSPATH . 'wp-admin/upgrade-functions.php' );
    69        
     69
    7070        require_once( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' );
    71        
     71
    7272        if ( is_object( $wp_roles ) ) {
    7373                $bb_roles =& $wp_roles;
    … …  
    8484        if ( !isset( $wp_taxonomy_object ) )
    8585                $wp_taxonomy_object = new BB_Taxonomy( $bbdb );
    86        
     86
    8787        $wp_taxonomy_object->register_taxonomy( 'bb_topic_tag', 'bb_topic' );
    8888
    … …  
    9696
    9797                dbDelta( $bb_queries );
    98                
     98
    9999                require_once( BB_PATH . 'bb-admin/includes/functions.bb-upgrade.php' );
    100100                bb_update_db_version();
    101                
     101
    102102                /* Set the site admins as the keymasters */
    103103                $site_admins = get_site_option( 'site_admins', array('admin') );
    … …  
    107107                // Create the first forum.
    108108                bb_new_forum( array( 'forum_name' => 'Default Forum' ) );
    109                
     109
    110110                // Set the site URI
    111111                bb_update_option( 'uri', BB_URL );
    … …  
    129129                $args = wp_parse_args( $args, $defaults );
    130130                extract( $args, EXTR_SKIP );
    131                
     131
    132132                return update_usermeta( $id, $meta_key, $meta_value );
    133133        }
Note: See TracChangeset for help on using the changeset viewer.