Skip to:
Content

BuddyPress.org

Changeset 6357


Ignore:
Timestamp:
09/28/2012 10:41:20 PM (12 years ago)
Author:
djpaul
Message:

Remove the bb-config.php file when group forums are uninstalled. Fixes #4397, props r-a-y

This change helps tidy up bbPress 1.x remnants when group forums are uninstalled. As this file
is automatically generated when bbPress 1.x group forums are installed, a user can reactivate the
old group forums and we'll rebuild the bb-config.php for them.

Location:
trunk
Files:
2 edited

Legend:

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

    r6343 r6357  
    376376    do_action( 'bp_admin_tabs' );
    377377}
     378
     379/**
     380 * Add the confirmation inline javascript in the WP admin dashboard.
     381 *
     382 * Only add it if we're not in BP maintenance mode.
     383 *
     384 * @since BuddyPress (1.7)
     385 * @uses bp_get_maintenance_mode() To see if we're in BP maintenance mode.
     386 * @uses bp_core_confirmation_js() To output our inline JS.
     387 */
     388function bp_core_admin_add_confirm_js() {
     389    if ( ! bp_get_maintenance_mode() )
     390        bp_core_confirmation_js();
     391}
     392add_action( 'admin_head', 'bp_core_admin_add_confirm_js' );
  • trunk/bp-forums/bp-forums-admin.php

    r6342 r6357  
    5959            // Delete the bb-config.php location option
    6060            bp_delete_option( 'bb-config-location' );
     61
     62            // Now delete the bb-config.php file
     63            @unlink( ABSPATH . 'bb-config.php' );
     64
     65            // show the updated wizard
    6166            bp_forums_bbpress_install_wizard();
    6267
     
    7883
    7984                <div>
    80                     <a class="button button-primary" href="<?php echo $action ?>"><?php _e( 'Uninstall Group Forums', 'buddypress' ) ?></a> &nbsp;
     85                    <a class="button button-primary confirm" href="<?php echo $action ?>"><?php _e( 'Uninstall Group Forums', 'buddypress' ) ?></a> &nbsp;
    8186                </div>
    8287            </div>
Note: See TracChangeset for help on using the changeset viewer.