Changeset 3592 for trunk/bp-core/admin/bp-core-upgrade.php
- Timestamp:
- 12/27/2010 10:57:31 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/admin/bp-core-upgrade.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-upgrade.php
r3550 r3592 10 10 // Install site options on activation 11 11 bp_core_activate_site_options( array( 'bp-disable-account-deletion' => 0, 'bp-disable-avatar-uploads' => 0, 'bp-disable-blogforum-comments' => 0, 'bp-disable-forum-directory' => 0, 'bp-disable-profile-sync' => 0 ) ); 12 12 13 13 /** 14 14 * bp_core_activate_site_options() … … 56 56 if ( $this->current_version = get_option( 'bp-db-version' ) ) 57 57 $this->is_network_activate = true; 58 58 59 59 $this->new_version = constant( 'BP_DB_VERSION' ); 60 60 $this->setup_type = ( empty( $this->current_version ) && !(int)get_site_option( 'bp-core-db-version' ) ) ? 'new' : 'upgrade'; … … 104 104 } else { 105 105 // Upgrade wizard steps 106 106 107 107 if ( $this->is_network_activate ) 108 108 $steps[] = __( 'Multisite Upgrade', 'buddypress' ); 109 109 110 110 if ( $this->current_version < $this->new_version ) 111 111 $steps[] = __( 'Database Upgrade', 'buddypress' ); … … 243 243 <?php 244 244 } 245 245 246 246 function step_ms_upgrade() { 247 247 if ( !current_user_can( 'activate_plugins' ) ) … … 252 252 else 253 253 $blogs_slug = __( 'blogs', 'buddypress' ); 254 254 255 255 if ( !defined( 'BP_ENABLE_MULTIBLOG' ) && is_multisite() ) 256 256 $existing_pages = get_blog_option( BP_ROOT_BLOG, 'bp-pages' ); … … 262 262 <p><input type="submit" value="<?php _e( 'Save & Next →', 'buddypress' ) ?>" name="submit" /></p> 263 263 </div> 264 264 265 265 <p><?php printf( __( 'It looks like you have just activated WordPress Multisite mode, which allows members of your BuddyPress community to have their own WordPress blogs. You can enable or disable this feature at any time at <a href="%s">Network Options</a>.', 'buddypress' ), admin_url( 'ms-options.php' ) ); ?></p> 266 266 267 267 <p><?php _e( "Please select the WordPress page you would like to use to display the blog directory. You can either choose an existing page or let BuddyPress auto-create a page for you. If you'd like to manually create pages, please go ahead and do that now, you can come back to this step once you are finished.", 'buddypress' ) ?></p> 268 268 … … 281 281 </td> 282 282 </tr> 283 283 284 284 </table> 285 285 286 286 <p><?php _e( 'Would you like to enable blog tracking, which tracks blog activity across your network?', 'buddypress' ); ?></p> 287 287 288 288 <div class="left-col"> 289 289 290 290 <div class="component"> 291 291 <h5><?php _e( "Blog Tracking", 'buddypress' ) ?></h5> … … 298 298 <img src="<?php echo plugins_url( 'buddypress/screenshot-7.gif' ) ?>" alt="Activity Streams" /> 299 299 <p><?php _e( "Track new blogs, new posts and new comments across your entire blog network.", 'buddypress' ) ?></p> 300 </div> 301 </div> 302 300 </div> 301 </div> 302 303 303 <div class="submit clear"> 304 304 <p><input type="submit" value="<?php _e( 'Save & Next →', 'buddypress' ) ?>" name="submit" /></p> … … 308 308 <?php wp_nonce_field( 'bpwizard_ms_upgrade' ) ?> 309 309 </div> 310 310 311 311 <script type="text/javascript"> 312 312 jQuery('select').click( function() { … … 838 838 if ( $current_blog->blog_id != BP_ROOT_BLOG && !defined( 'BP_ENABLE_MULTIBLOG' ) ) 839 839 switch_to_blog( BP_ROOT_BLOG ); 840 840 841 841 $existing_pages = get_option( 'bp-pages' ); 842 842 843 843 $bp_pages = $this->setup_pages( (array)$_POST['bp_pages'] ); 844 844 845 845 $bp_pages = array_merge( (array)$existing_pages, (array)$bp_pages ); 846 846 847 847 update_option( 'bp-pages', $bp_pages ); 848 848 849 849 if ( $current_blog->blog_id != BP_ROOT_BLOG ) 850 850 restore_current_blog(); 851 851 852 852 unset( $disabled['bp-blogs.php'] ); 853 853 854 854 bp_core_install( $disabled ); 855 855 } 856 856 857 857 update_site_option( 'bp-deactivated-components', $disabled ); 858 858 … … 1045 1045 return false; 1046 1046 } 1047 1047 1048 1048 function setup_pages( $pages ) { 1049 1049 foreach ( $pages as $key => $value ) { … … 1059 1059 } 1060 1060 } 1061 1061 1062 1062 return $bp_pages; 1063 1063 }
Note: See TracChangeset
for help on using the changeset viewer.