Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/13/2012 04:03:55 AM (13 years ago)
Author:
johnjamesjacoby
Message:

First pass at refactoring update/install wizard to remove code duplication:

  • Rename and move admin images, css, and js into bp-core/admin/ folders
  • Load the wizard from inside BP_Admin instead of selectively alone, so that basic functions are available
  • Properly enqueue admin scripts
  • Remove duplicated _update_ functions in bp-core-updater.php
  • Remove weird redirect hack as it's no longer needed
  • Remove purpose built functions that are no longer needed
  • See #4005.
  • Indirectly fixes #3964.
File:
1 edited

Legend:

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

    r5683 r5749  
    5252 */
    5353function bp_core_admin_components_options() {
    54     global $bp_wizard;
    5554
    5655    // Load core functions, if needed
     
    131130
    132131    // On new install, set all components to be active by default
    133     if ( !empty( $bp_wizard ) && 'install' == $bp_wizard->setup_type && empty( $active_components ) )
     132    if ( empty( $active_components ) && ( bp_get_maintenance_mode() == 'install' ) )
    134133        $active_components = $optional_components;
    135134
    136     ?>
    137 
    138     <?php /* The setup wizard uses different, more descriptive text here */ ?>
    139     <?php if ( empty( $bp_wizard ) ) : ?>
     135    // The setup wizard uses different, more descriptive text
     136    if ( bp_get_maintenance_mode() ) : ?>
    140137
    141138        <h3><?php _e( 'Available Components', 'buddypress' ); ?></h3>
     
    169166    </table>
    170167
    171     <?php if ( empty( $bp_wizard ) ) : ?>
     168    <?php if ( bp_get_maintenance_mode() ) : ?>
    172169
    173170        <h3><?php _e( 'Required Components', 'buddypress' ); ?></h3>
Note: See TracChangeset for help on using the changeset viewer.