Skip to:
Content

BuddyPress.org

Changeset 4291


Ignore:
Timestamp:
04/25/2011 09:59:14 AM (15 years ago)
Author:
djpaul
Message:

Only show permalinks panel during install if not already in use. Fixes #3178, props cnorris23

File:
1 edited

Legend:

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

    r4289 r4291  
    6767            );
    6868
     69        // Only show permalinks panel if we don't already use them
     70            if ( !empty( $wp_rewrite->permalink_structure ) ) {
     71                unset( $steps[2] );
     72
     73                // Reset the keys by merging with an empty array
     74                $steps = array_merge( array(), $steps );
     75            }
     76
    6977        // Update wizard steps
    7078        } else {
     
    263271        else
    264272            $blogs_slug = 'blogs';
    265  
    266         // Call up old bp-pages to see if a page has been previously linked to Blogs 
     273
     274        // Call up old bp-pages to see if a page has been previously linked to Blogs
    267275        $page_blog_id       = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
    268276        $existing_pages_data    = get_blog_option( $page_blog_id, 'bp-pages' );
     
    774782                $existing_pages_data    = get_blog_option( $page_blog_id, 'bp-pages' );
    775783                $existing_pages     = $existing_pages_data[$page_blog_id];
    776                
     784
    777785                $bp_pages           = $this->setup_pages( (array)$_POST['bp_pages'] );
    778786                $bp_pages           = array_merge( (array)$existing_pages, (array)$bp_pages );
    779                
     787
    780788                $existing_pages_data[$page_blog_id] = $bp_pages;
    781789
     
    10071015            @setcookie( 'bp-wizard-step', '', time() - 3600, COOKIEPATH );
    10081016
    1009             // Load BP, so that the redirect is successful         
     1017            // Load BP, so that the redirect is successful
    10101018            require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' );
    10111019
     
    10711079
    10721080    require_once( dirname( __FILE__ ) . '/bp-core-schema.php' );
    1073    
     1081
    10741082    // Core DB Tables
    10751083    bp_core_install_notifications();
     
    12841292function bp_core_update_get_page_meta() {
    12851293    $page_ids = get_site_option( 'bp-pages' );
    1286    
     1294
    12871295    $is_enable_multiblog = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? true : false;
    12881296
    12891297    $page_blog_id = $is_enable_multiblog ? get_current_blog_id() : BP_ROOT_BLOG;
    1290    
     1298
    12911299    $blog_page_ids = !empty( $page_ids[$page_blog_id] ) ? $page_ids[$page_blog_id] : false;
    1292    
     1300
    12931301    return apply_filters( 'bp_core_update_get_page_meta', $blog_page_ids );
    12941302}
Note: See TracChangeset for help on using the changeset viewer.