Skip to:
Content

BuddyPress.org

Ticket #3480: 3480.01.patch

File 3480.01.patch, 2.1 KB (added by boonebgorges, 14 years ago)
  • bp-core/admin/bp-core-admin.php

    function bp_core_admin_component_options() { 
    342342                )
    343343        );
    344344
    345         if ( is_multisite() )
    346                 $optional_components['blogs']['description'] = __( 'Make BuddyPress aware of new sites, new posts and new comments from across your entire network.', 'buddypress' );
     345        if ( is_multisite() )
     346                $optional_components['blogs']['description'] = __( 'Make BuddyPress aware of new sites, new posts and new comments from across your entire network.', 'buddypress' );
     347
     348        // If this is an upgrade from before BuddyPress 1.5, we'll have to convert deactivated
     349        // components into activated ones
     350        if ( empty( $active_components ) ) {
     351                $deactivated_components = bp_get_option( 'bp-deactivated-components' );
     352
     353                // Trim off namespace and filename
     354                $trimmed = array();
     355                foreach ( (array) $deactivated_components as $component => $value ) {
     356                        $trimmed[] = str_replace( '.php', '', str_replace( 'bp-', '', $component ) );
     357                }
     358
     359                // Loop through the optional components to create an active component array
     360                foreach ( (array) $optional_components as $ocomponent => $ovalue ) {
     361                        if ( !in_array( $ocomponent, $trimmed ) ) {
     362                                $active_components[$ocomponent] = 1;
     363                        }
     364                }
     365        }
    347366
    348367        // Required components
    349368        $required_components = array(
  • bp-core/admin/bp-core-update.php

    class BP_Core_Setup_Wizard { 
    8484                        if ( $this->database_version < (int) $this->new_version )
    8585                                $steps[] = __( 'Database Update', 'buddypress' );
    8686
    87                         if ( $this->database_version < 1801 || !bp_core_get_directory_page_ids() )
     87                        if ( $this->database_version < 1801 || !bp_core_get_directory_page_ids() ) {
     88                                $steps[] = __( 'Components', 'buddypress' );
    8889                                $steps[] = __( 'Pages', 'buddypress' );
     90                        }
    8991
    9092                        $steps[] = __( 'Finish', 'buddypress' );
    9193                }