Ticket #3178: 3178.001.diff
| File 3178.001.diff, 3.4 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 ); 61 // Do we have pretty permalinks? 62 $permalinks = get_option( 'permalink_structure' ); 68 63 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 69 82 // Update wizard steps 70 83 } else { 71 84 if ( $this->is_network_activate ) … … 262 275 $blogs_slug = constant( 'BP_BLOGS_SLUG' ); 263 276 else 264 277 $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 267 280 $page_blog_id = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG; 268 281 $existing_pages_data = get_blog_option( $page_blog_id, 'bp-pages' ); 269 282 $existing_pages = $existing_pages_data[$page_blog_id]; … … 773 786 $page_blog_id = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG; 774 787 $existing_pages_data = get_blog_option( $page_blog_id, 'bp-pages' ); 775 788 $existing_pages = $existing_pages_data[$page_blog_id]; 776 789 777 790 $bp_pages = $this->setup_pages( (array)$_POST['bp_pages'] ); 778 791 $bp_pages = array_merge( (array)$existing_pages, (array)$bp_pages ); 779 792 780 793 $existing_pages_data[$page_blog_id] = $bp_pages; 781 794 782 795 update_site_option( 'bp-pages', $existing_pages_data ); … … 1006 1019 // Delete the setup cookie 1007 1020 @setcookie( 'bp-wizard-step', '', time() - 3600, COOKIEPATH ); 1008 1021 1009 // Load BP, so that the redirect is successful 1022 // Load BP, so that the redirect is successful 1010 1023 require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' ); 1011 1024 1012 1025 // Redirect to the BuddyPress dashboard … … 1070 1083 $active_components = apply_filters( 'bp_active_components', get_site_option( 'bp-active-components' ) ); 1071 1084 1072 1085 require_once( dirname( __FILE__ ) . '/bp-core-schema.php' ); 1073 1086 1074 1087 // Core DB Tables 1075 1088 bp_core_install_notifications(); 1076 1089 … … 1283 1296 */ 1284 1297 function bp_core_update_get_page_meta() { 1285 1298 $page_ids = get_site_option( 'bp-pages' ); 1286 1299 1287 1300 $is_enable_multiblog = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? true : false; 1288 1301 1289 1302 $page_blog_id = $is_enable_multiblog ? get_current_blog_id() : BP_ROOT_BLOG; 1290 1303 1291 1304 $blog_page_ids = !empty( $page_ids[$page_blog_id] ) ? $page_ids[$page_blog_id] : false; 1292 1305 1293 1306 return apply_filters( 'bp_core_update_get_page_meta', $blog_page_ids ); 1294 1307 } 1295 1308