Ticket #3178: 3178.002.diff
| File 3178.002.diff, 3.3 KB (added by , 15 years ago) |
|---|
-
bp-core/admin/bp-core-update.php
58 58 $steps = array(); 59 59 60 60 if ( 'install' == $this->setup_type ) { 61 $steps = array(62 __( 'Components', 'buddypress' ),63 __( 'Pages', 'buddypress' ),64 __( 'Permalinks', 'buddypress' ),65 __( 'Theme', 'buddypress' ),66 __( 'Finish', 'buddypress' )67 );68 61 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 69 80 // Update wizard steps 70 81 } else { 71 82 if ( $this->is_network_activate ) … … 262 273 $blogs_slug = constant( 'BP_BLOGS_SLUG' ); 263 274 else 264 275 $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 267 278 $page_blog_id = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG; 268 279 $existing_pages_data = get_blog_option( $page_blog_id, 'bp-pages' ); 269 280 $existing_pages = $existing_pages_data[$page_blog_id]; … … 773 784 $page_blog_id = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG; 774 785 $existing_pages_data = get_blog_option( $page_blog_id, 'bp-pages' ); 775 786 $existing_pages = $existing_pages_data[$page_blog_id]; 776 787 777 788 $bp_pages = $this->setup_pages( (array)$_POST['bp_pages'] ); 778 789 $bp_pages = array_merge( (array)$existing_pages, (array)$bp_pages ); 779 790 780 791 $existing_pages_data[$page_blog_id] = $bp_pages; 781 792 782 793 update_site_option( 'bp-pages', $existing_pages_data ); … … 1006 1017 // Delete the setup cookie 1007 1018 @setcookie( 'bp-wizard-step', '', time() - 3600, COOKIEPATH ); 1008 1019 1009 // Load BP, so that the redirect is successful 1020 // Load BP, so that the redirect is successful 1010 1021 require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' ); 1011 1022 1012 1023 // Redirect to the BuddyPress dashboard … … 1070 1081 $active_components = apply_filters( 'bp_active_components', get_site_option( 'bp-active-components' ) ); 1071 1082 1072 1083 require_once( dirname( __FILE__ ) . '/bp-core-schema.php' ); 1073 1084 1074 1085 // Core DB Tables 1075 1086 bp_core_install_notifications(); 1076 1087 … … 1283 1294 */ 1284 1295 function bp_core_update_get_page_meta() { 1285 1296 $page_ids = get_site_option( 'bp-pages' ); 1286 1297 1287 1298 $is_enable_multiblog = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? true : false; 1288 1299 1289 1300 $page_blog_id = $is_enable_multiblog ? get_current_blog_id() : BP_ROOT_BLOG; 1290 1301 1291 1302 $blog_page_ids = !empty( $page_ids[$page_blog_id] ) ? $page_ids[$page_blog_id] : false; 1292 1303 1293 1304 return apply_filters( 'bp_core_update_get_page_meta', $blog_page_ids ); 1294 1305 } 1295 1306