Changeset 4342 for trunk/bp-core/admin/bp-core-update.php
- Timestamp:
- 05/10/2011 01:10:20 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-update.php
r4311 r4342 263 263 else 264 264 $blogs_slug = 'blogs'; 265 266 // Call up old bp-pages to see if a page has been previously linked to Blogs 265 266 // Call up old bp-pages to see if a page has been previously linked to Blogs 267 267 $page_blog_id = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? get_current_blog_id() : BP_ROOT_BLOG; 268 268 $existing_pages_data = get_blog_option( $page_blog_id, 'bp-pages' ); … … 517 517 $prefix = ''; 518 518 $permalink_structure = get_option( 'permalink_structure' ); 519 $using_permalinks = ( !empty( $permalink_structure ) ) ? true : false; 519 520 $structures = array( '', $prefix . '/%year%/%monthnum%/%day%/%postname%/', $prefix . '/%year%/%monthnum%/%postname%/', $prefix . '/archives/%post_id%' ); 521 522 // If we're using permalinks already, adjust text accordingly 523 if ( $permalink_structure ) 524 $permalink_setup_text = __( 'Congratulations! You are already using pretty permalinks, which BuddyPress requires. If you\'d like to change your settings, you may do so now. If you\'re happy with your current settings, click Save & Next to continue.', 'buddypress' ); 525 else 526 $permalink_setup_text = __( 'To make sure the pages created in the previous step work correctly, pretty permalinks must be active on your site.', 'buddypress' ); 520 527 521 528 if ( !got_mod_rewrite() && !iis7_supports_permalinks() ) 522 529 $prefix = '/index.php'; ?> 523 530 524 <p><?php _e( 'To make sure the pages created in the previous step work correctly, pretty permalinks must be active on your site.', 'buddypress' ); ?></p>531 <p><?php echo $permalink_setup_text; ?></p> 525 532 <p><?php printf( __( 'Please select the permalink setting you would like to use. For more advanced options please visit the <a href="%s">permalink settings page</a> first, and complete this setup wizard later.', 'buddypress' ), admin_url( 'options-permalink.php' ) ); ?> 526 533 … … 759 766 $existing_pages_data = get_blog_option( $page_blog_id, 'bp-pages' ); 760 767 $existing_pages = $existing_pages_data[$page_blog_id]; 761 768 762 769 $bp_pages = $this->setup_pages( (array)$_POST['bp_pages'] ); 763 770 $bp_pages = array_merge( (array)$existing_pages, (array)$bp_pages ); 764 771 765 772 $existing_pages_data[$page_blog_id] = $bp_pages; 766 773 … … 992 999 @setcookie( 'bp-wizard-step', '', time() - 3600, COOKIEPATH ); 993 1000 994 // Load BP, so that the redirect is successful 1001 // Load BP, so that the redirect is successful 995 1002 require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/bp-core-loader.php' ); 996 1003 … … 1056 1063 1057 1064 require_once( dirname( __FILE__ ) . '/bp-core-schema.php' ); 1058 1065 1059 1066 // Core DB Tables 1060 1067 bp_core_install_notifications(); … … 1234 1241 function bp_core_update_get_page_meta() { 1235 1242 $page_ids = get_site_option( 'bp-pages' ); 1236 1243 1237 1244 $is_enable_multiblog = is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) && BP_ENABLE_MULTIBLOG ? true : false; 1238 1245 1239 1246 $page_blog_id = $is_enable_multiblog ? get_current_blog_id() : BP_ROOT_BLOG; 1240 1247 1241 1248 $blog_page_ids = !empty( $page_ids[$page_blog_id] ) ? $page_ids[$page_blog_id] : false; 1242 1249 1243 1250 return apply_filters( 'bp_core_update_get_page_meta', $blog_page_ids ); 1244 1251 }
Note: See TracChangeset
for help on using the changeset viewer.