Skip to:
Content

BuddyPress.org

Changeset 4794


Ignore:
Timestamp:
07/22/2011 01:45:08 PM (10 years ago)
Author:
boonebgorges
Message:

Cleans up require()s in BP installation process. Fixes #3369. See #3367

Location:
trunk/bp-core/admin
Files:
3 edited

Legend:

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

    r4775 r4794  
    329329function bp_core_admin_component_options() {
    330330    global $bp_wizard;
    331            
    332     require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
     331   
     332    // Load core functions, if needed
     333    if ( !function_exists( 'bp_get_option' ) )
     334        require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
    333335
    334336    $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) );
  • trunk/bp-core/admin/bp-core-schema.php

    r4775 r4794  
    11<?php
    2 require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
    3  
     2
    43function bp_core_set_charset() {
    54    global $wpdb;
    65
    7     require( ABSPATH . 'wp-admin/includes/upgrade.php' );
     6    require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    87
    98    /* BuddyPress component DB schema */
  • trunk/bp-core/admin/bp-core-update.php

    r4775 r4794  
    1717        global $bp;
    1818
    19         // Ensure that we have access to some utility functions
    20         require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
     19        // Ensure that we have access to some utility functions. Must use require_once()
     20        // because BP Core is loaded during incremental upgrades
     21        require_once( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
    2122
    2223        // Get current DB version
     
    585586            return false;
    586587
    587         require( ABSPATH . WPINC . '/plugin.php' );
    588588        $installed_plugins = get_plugins();
    589589        $installed_themes  = get_themes();
     
    10191019
    10201020            // Load BP and hook the admin menu, so that the redirect is successful
    1021             require( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' );
    10221021            require( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-admin.php' );
    10231022            bp_core_add_admin_menu();
     
    12611260 * @return array $page_ids
    12621261 */
    1263 function bp_core_update_get_page_meta() {           
    1264     require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
    1265    
     1262function bp_core_update_get_page_meta() {
    12661263    if ( !$page_ids = bp_get_option( 'bp-pages' ) )
    12671264        $page_ids = array();
Note: See TracChangeset for help on using the changeset viewer.