Skip to:
Content

BuddyPress.org

Ticket #3178: 3178.001.diff

File 3178.001.diff, 3.4 KB (added by cnorris23, 15 years ago)
  • bp-core/admin/bp-core-update.php

     
    5858                $steps = array();
    5959
    6060                if ( 'install' == $this->setup_type ) {
    61                         $steps = array(
    62                                 __( 'Components', 'buddypress' ),
    63                                 __( 'Pages',      'buddypress' ),
    64                                 __( 'Permalinks', 'buddypress' ),
    65                                 __( 'Theme',      'buddypress' ),
    66                                 __( 'Finish',     'buddypress' )
    67                         );
     61                        // Do we have pretty permalinks?
     62                        $permalinks = get_option( 'permalink_structure' );
    6863
     64                        // Only show pretty permalinks panel if we don't already use them
     65                        if ( empty( $permalinks ) ) {
     66                                $steps = array(
     67                                        __( 'Components', 'buddypress' ),
     68                                        __( 'Pages',      'buddypress' ),
     69                                        __( 'Permalinks', 'buddypress' ),
     70                                        __( 'Theme',      'buddypress' ),
     71                                        __( 'Finish',     'buddypress' )
     72                                );
     73                        } else {
     74                                $steps = array(
     75                                        __( 'Components', 'buddypress' ),
     76                                        __( 'Pages',      'buddypress' ),
     77                                        __( 'Theme',      'buddypress' ),
     78                                        __( 'Finish',     'buddypress' )
     79                                );
     80                        }
     81
    6982                // Update wizard steps
    7083                } else {
    7184                        if ( $this->is_network_activate )
     
    262275                        $blogs_slug = constant( 'BP_BLOGS_SLUG' );
    263276                else
    264277                        $blogs_slug = 'blogs';
    265  
    266                 // Call up old bp-pages to see if a page has been previously linked to Blogs 
     278
     279                // Call up old bp-pages to see if a page has been previously linked to Blogs
    267280                $page_blog_id           = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
    268281                $existing_pages_data    = get_blog_option( $page_blog_id, 'bp-pages' );
    269282                $existing_pages         = $existing_pages_data[$page_blog_id];
     
    773786                                $page_blog_id           = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
    774787                                $existing_pages_data    = get_blog_option( $page_blog_id, 'bp-pages' );
    775788                                $existing_pages         = $existing_pages_data[$page_blog_id];
    776                                
     789
    777790                                $bp_pages               = $this->setup_pages( (array)$_POST['bp_pages'] );
    778791                                $bp_pages               = array_merge( (array)$existing_pages, (array)$bp_pages );
    779                                
     792
    780793                                $existing_pages_data[$page_blog_id] = $bp_pages;
    781794
    782795                                update_site_option( 'bp-pages', $existing_pages_data );
     
    10061019                        // Delete the setup cookie
    10071020                        @setcookie( 'bp-wizard-step', '', time() - 3600, COOKIEPATH );
    10081021
    1009                         // Load BP, so that the redirect is successful                 
     1022                        // Load BP, so that the redirect is successful
    10101023                        require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' );
    10111024
    10121025                        // Redirect to the BuddyPress dashboard
     
    10701083                $active_components = apply_filters( 'bp_active_components', get_site_option( 'bp-active-components' ) );
    10711084
    10721085        require_once( dirname( __FILE__ ) . '/bp-core-schema.php' );
    1073        
     1086
    10741087        // Core DB Tables
    10751088        bp_core_install_notifications();
    10761089
     
    12831296 */
    12841297function bp_core_update_get_page_meta() {
    12851298        $page_ids = get_site_option( 'bp-pages' );
    1286        
     1299
    12871300        $is_enable_multiblog = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? true : false;
    12881301
    12891302        $page_blog_id = $is_enable_multiblog ? get_current_blog_id() : BP_ROOT_BLOG;
    1290        
     1303
    12911304        $blog_page_ids = !empty( $page_ids[$page_blog_id] ) ? $page_ids[$page_blog_id] : false;
    1292        
     1305
    12931306        return apply_filters( 'bp_core_update_get_page_meta', $blog_page_ids );
    12941307}
    12951308