Ticket #2190: 2190.diff
File 2190.diff, 2.3 KB (added by , 15 years ago) |
---|
-
bp-core/bp-core-wpabstraction.php
89 89 return true; 90 90 } 91 91 } 92 93 function bp_activate_site_options( $keys = array() ) { 94 global $bp; 95 if ( !empty( $keys ) && is_array( $keys ) ) { 96 foreach ( $keys as $key => $default ) { 97 if ( empty( $bp->site_options[ $key ] ) ) { 98 $bp->site_options[ $key ] = get_blog_option( BP_ROOT_BLOG, $key, $default ); 99 update_site_option( $key, $bp->site_options[ $key ] ); 100 } 101 } 102 } 103 } -
bp-loader.php
64 64 if ( 'bp-sn-parent' == get_blog_option( BP_ROOT_BLOG, 'template' ) && 'bp-default' == get_blog_option( BP_ROOT_BLOG, 'stylesheet' ) ) 65 65 switch_theme( 'bp-default', 'bp-default' ); 66 66 67 bp_activate_site_options( array( 'bp-disable-account-deletion' => '0', 'bp-disable-avatar-uploads' => '0', 68 'bp-disable-blogforum-comments' => '0', 'bp-disable-forum-directory' => '0', 'bp-disable-profile-sync' => '0' ) ); 69 67 70 do_action( 'bp_loader_activate' ); 68 71 } 69 72 register_activation_hook( 'buddypress/bp-loader.php', 'bp_loader_activate' ); … … 87 90 } 88 91 register_deactivation_hook( 'buddypress/bp-loader.php', 'bp_loader_deactivate' ); 89 92 90 ?> 91 No newline at end of file 93 ?> -
bp-xprofile.php
27 27 if ( !empty($wpdb->charset) ) 28 28 $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; 29 29 30 if ( empty( $bp->site_options['bp-xprofile-base-group-name'] ) ) 31 update_site_option( 'bp-xprofile-base-group-name', 'Base' ); 30 bp_activate_site_options( array( 'bp-xprofile-base-group-name' => 'Base', 'bp-xprofile-fullname-field-name' => 'Name' ) ); 32 31 33 if ( empty( $bp->site_options['bp-xprofile-fullname-field-name'] ) )34 update_site_option( 'bp-xprofile-fullname-field-name', 'Name' );35 36 32 $sql[] = "CREATE TABLE {$bp->profile->table_name_groups} ( 37 33 id bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, 38 34 name varchar(150) NOT NULL,