Skip to:
Content

BuddyPress.org

Ticket #3178: 3178.002.diff

File 3178.002.diff, 3.3 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                         );
    6861
     62                        // Only show pretty permalinks panel if we don't already use them
     63                        if ( empty( $wp_rewrite->permalink_structure ) ) {
     64                                $steps = array(
     65                                        __( 'Components', 'buddypress' ),
     66                                        __( 'Pages',      'buddypress' ),
     67                                        __( 'Permalinks', 'buddypress' ),
     68                                        __( 'Theme',      'buddypress' ),
     69                                        __( 'Finish',     'buddypress' )
     70                                );
     71                        } else {
     72                                $steps = array(
     73                                        __( 'Components', 'buddypress' ),
     74                                        __( 'Pages',      'buddypress' ),
     75                                        __( 'Theme',      'buddypress' ),
     76                                        __( 'Finish',     'buddypress' )
     77                                );
     78                        }
     79
    6980                // Update wizard steps
    7081                } else {
    7182                        if ( $this->is_network_activate )
     
    262273                        $blogs_slug = constant( 'BP_BLOGS_SLUG' );
    263274                else
    264275                        $blogs_slug = 'blogs';
    265  
    266                 // Call up old bp-pages to see if a page has been previously linked to Blogs 
     276
     277                // Call up old bp-pages to see if a page has been previously linked to Blogs
    267278                $page_blog_id           = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
    268279                $existing_pages_data    = get_blog_option( $page_blog_id, 'bp-pages' );
    269280                $existing_pages         = $existing_pages_data[$page_blog_id];
     
    773784                                $page_blog_id           = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG;
    774785                                $existing_pages_data    = get_blog_option( $page_blog_id, 'bp-pages' );
    775786                                $existing_pages         = $existing_pages_data[$page_blog_id];
    776                                
     787
    777788                                $bp_pages               = $this->setup_pages( (array)$_POST['bp_pages'] );
    778789                                $bp_pages               = array_merge( (array)$existing_pages, (array)$bp_pages );
    779                                
     790
    780791                                $existing_pages_data[$page_blog_id] = $bp_pages;
    781792
    782793                                update_site_option( 'bp-pages', $existing_pages_data );
     
    10061017                        // Delete the setup cookie
    10071018                        @setcookie( 'bp-wizard-step', '', time() - 3600, COOKIEPATH );
    10081019
    1009                         // Load BP, so that the redirect is successful                 
     1020                        // Load BP, so that the redirect is successful
    10101021                        require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' );
    10111022
    10121023                        // Redirect to the BuddyPress dashboard
     
    10701081                $active_components = apply_filters( 'bp_active_components', get_site_option( 'bp-active-components' ) );
    10711082
    10721083        require_once( dirname( __FILE__ ) . '/bp-core-schema.php' );
    1073        
     1084
    10741085        // Core DB Tables
    10751086        bp_core_install_notifications();
    10761087
     
    12831294 */
    12841295function bp_core_update_get_page_meta() {
    12851296        $page_ids = get_site_option( 'bp-pages' );
    1286        
     1297
    12871298        $is_enable_multiblog = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? true : false;
    12881299
    12891300        $page_blog_id = $is_enable_multiblog ? get_current_blog_id() : BP_ROOT_BLOG;
    1290        
     1301
    12911302        $blog_page_ids = !empty( $page_ids[$page_blog_id] ) ? $page_ids[$page_blog_id] : false;
    1292        
     1303
    12931304        return apply_filters( 'bp_core_update_get_page_meta', $blog_page_ids );
    12941305}
    12951306