Changeset 3713
- Timestamp:
- 01/14/2011 11:49:17 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
- 1 moved
-
bp-core.php (modified) (3 diffs)
-
bp-core/admin/bp-core-update.php (moved) (moved from trunk/bp-core/admin/bp-core-upgrade.php) (22 diffs)
-
bp-forums.php (modified) (1 diff)
-
bp-forums/bp-forums-bbpress.php (modified) (2 diffs)
-
bp-loader.php (modified) (1 diff)
-
bp-messages/bp-messages-classes.php (modified) (2 diffs)
-
bp-themes/bp-default/style.css (modified) (1 diff)
-
bp-xprofile.php (modified) (1 diff)
-
bp-xprofile/bp-xprofile-cssjs.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r3712 r3713 299 299 require ( BP_PLUGIN_DIR . '/bp-core/admin/bp-core-admin.php' ); 300 300 } 301 is_multisite() ? add_action( 'network_admin_menu', 'bp_core_admin_menu_init' ) : add_action('admin_menu', 'bp_core_admin_menu_init' );301 add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'bp_core_admin_menu_init' ); 302 302 303 303 /** … … 331 331 add_action( "admin_print_styles-$hook", 'bp_core_add_admin_menu_styles' ); 332 332 } 333 is_multisite() ? add_action( 'network_admin_menu', 'bp_core_add_admin_menu' ) : add_action('admin_menu', 'bp_core_add_admin_menu' );333 add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'bp_core_add_admin_menu' ); 334 334 335 335 /** … … 1974 1974 if ( !defined( 'BP_SILENCE_THEME_NOTICE' ) && !in_array( 'buddypress', (array)$ct->tags ) ) { ?> 1975 1975 <div id="message" class="updated fade"> 1976 <p style="line-height: 150%"><?php printf( __( "<strong>BuddyPress is ready</strong>. You'll need to <a href='%s'>activate a BuddyPress compatible theme</a> to take advantage of all of the features. We've bundled a default theme, but you can always <a href='%s'>install some other compatible themes</a> or <a href='%s'>up grade your existing WordPress theme</a>.", 'buddypress' ), admin_url( 'themes.php' ), admin_url( 'theme-install.php?type=tag&s=buddypress&tab=search' ), admin_url( 'plugin-install.php?type=term&tab=search&s=%22bp-template-pack%22' ) ) ?></p>1976 <p style="line-height: 150%"><?php printf( __( "<strong>BuddyPress is ready</strong>. You'll need to <a href='%s'>activate a BuddyPress compatible theme</a> to take advantage of all of the features. We've bundled a default theme, but you can always <a href='%s'>install some other compatible themes</a> or <a href='%s'>update your existing WordPress theme</a>.", 'buddypress' ), admin_url( 'themes.php' ), admin_url( 'theme-install.php?type=tag&s=buddypress&tab=search' ), admin_url( 'plugin-install.php?type=term&tab=search&s=%22bp-template-pack%22' ) ) ?></p> 1977 1977 </div><?php 1978 1978 } -
trunk/bp-core/admin/bp-core-update.php
r3710 r3713 64 64 65 65 $this->new_version = constant( 'BP_DB_VERSION' ); 66 $this->setup_type = ( empty( $this->current_version ) && !(int)get_site_option( 'bp-core-db-version' ) ) ? 'new' : 'up grade';66 $this->setup_type = ( empty( $this->current_version ) && !(int)get_site_option( 'bp-core-db-version' ) ) ? 'new' : 'update'; 67 67 $this->current_step = $this->current_step(); 68 68 … … 71 71 $this->save( $_POST['save'] ); 72 72 73 // Build the steps needed for up grade or new installations73 // Build the steps needed for update or new installations 74 74 $this->steps = $this->add_steps(); 75 75 } … … 109 109 } 110 110 } else { 111 // Up grade wizard steps111 // Update wizard steps 112 112 113 113 if ( $this->is_network_activate ) 114 $steps[] = __( 'Multisite Up grade', 'buddypress' );114 $steps[] = __( 'Multisite Update', 'buddypress' ); 115 115 116 116 if ( $this->current_version < $this->new_version ) 117 $steps[] = __( 'Database Up grade', 'buddypress' );117 $steps[] = __( 'Database Update', 'buddypress' ); 118 118 119 119 if ( $this->current_version < 1225 ) … … 129 129 // Save any posted values 130 130 switch ( $step_name ) { 131 case 'db_up grade': default:132 $result = $this->step_db_up grade_save();131 case 'db_update': default: 132 $result = $this->step_db_update_save(); 133 133 break; 134 case 'ms_up grade': default:135 $result = $this->step_ms_up grade_save();134 case 'ms_update': default: 135 $result = $this->step_ms_update_save(); 136 136 break; 137 137 case 'ms_pages': default: 138 $result = $this->step_ms_up grade_save();138 $result = $this->step_ms_update_save(); 139 139 break; 140 140 case 'components': default: … … 168 168 <h3><?php _e( 'BuddyPress', 'buddypress' ) ?></h3> 169 169 <h4> 170 <?php if ( 'up grade' == $this->setup_type ) : ?>171 <?php _e( 'Up grade', 'buddypress' ) ?>170 <?php if ( 'update' == $this->setup_type ) : ?> 171 <?php _e( 'Update', 'buddypress' ) ?> 172 172 <?php else : ?> 173 173 <?php _e( 'Setup', 'buddypress' ) ?> … … 201 201 <div id="bp-admin-content"> 202 202 <?php switch ( $this->steps[$this->current_step] ) { 203 case __( 'Database Up grade', 'buddypress'):204 $this->step_db_up grade();203 case __( 'Database Update', 'buddypress'): 204 $this->step_db_update(); 205 205 break; 206 case __( 'Multisite Up grade', 'buddypress'):207 $this->step_ms_up grade();206 case __( 'Multisite Update', 'buddypress'): 207 $this->step_ms_update(); 208 208 break; 209 209 case __( 'Blog Directory', 'buddypress'): 210 $this->step_ms_up grade();210 $this->step_ms_update(); 211 211 break; 212 212 case __( 'Components', 'buddypress'): … … 235 235 /* Setup Step HTML */ 236 236 237 function step_db_up grade() {237 function step_db_update() { 238 238 if ( !current_user_can( 'activate_plugins' ) ) 239 239 return false; 240 240 ?> 241 241 <div class="prev-next submit clear"> 242 <p><input type="submit" value="<?php _e( 'Up grade & Next →', 'buddypress' ) ?>" name="submit" /></p>243 </div> 244 245 <p><?php _e( 'BuddyPress has been updated! Before you can continue using BuddyPress, we have to up grade your database to the newest version.', 'buddypress' ); ?></p>242 <p><input type="submit" value="<?php _e( 'Update & Next →', 'buddypress' ) ?>" name="submit" /></p> 243 </div> 244 245 <p><?php _e( 'BuddyPress has been updated! Before you can continue using BuddyPress, we have to update your database to the newest version.', 'buddypress' ); ?></p> 246 246 247 247 <div class="submit clear"> 248 <p><input type="submit" value="<?php _e( 'Up grade & Next →', 'buddypress' ) ?>" name="submit" /></p>249 250 <input type="hidden" name="save" value="db_up grade" />248 <p><input type="submit" value="<?php _e( 'Update & Next →', 'buddypress' ) ?>" name="submit" /></p> 249 250 <input type="hidden" name="save" value="db_update" /> 251 251 <input type="hidden" name="step" value="<?php echo esc_attr( $this->current_step ) ?>" /> 252 <?php wp_nonce_field( 'bpwizard_db_up grade' ) ?>252 <?php wp_nonce_field( 'bpwizard_db_update' ) ?> 253 253 </div> 254 254 <?php 255 255 } 256 256 257 function step_ms_up grade() {257 function step_ms_update() { 258 258 if ( !current_user_can( 'activate_plugins' ) ) 259 259 return false; … … 315 315 <p><input type="submit" value="<?php _e( 'Save & Next →', 'buddypress' ) ?>" name="submit" /></p> 316 316 317 <input type="hidden" name="save" value="ms_up grade" />317 <input type="hidden" name="save" value="ms_update" /> 318 318 <input type="hidden" name="step" value="<?php echo esc_attr( $this->current_step ) ?>" /> 319 <?php wp_nonce_field( 'bpwizard_ms_up grade' ) ?>319 <?php wp_nonce_field( 'bpwizard_ms_update' ) ?> 320 320 </div> 321 321 … … 717 717 <tr> 718 718 <th> 719 <h5>Automatically Up grade My WordPress Theme</h5>719 <h5>Automatically Update My WordPress Theme</h5> 720 720 <img src="<?php echo plugins_url( '/buddypress/bp-core/images/auto_theme.jpg' ) ?>" alt="bp-default" /> 721 721 </th> 722 722 <td> 723 <p>The BuddyPress [plugin name] plugin will automatically up grade your existing WordPress theme so it can display BuddyPress pages. Your existing theme's page.php template file will be used to show BuddyPress content.</p>723 <p>The BuddyPress [plugin name] plugin will automatically update your existing WordPress theme so it can display BuddyPress pages. Your existing theme's page.php template file will be used to show BuddyPress content.</p> 724 724 <p><strong>This is the best choice if you have an existing WordPress theme and simply want to start using BuddyPress features without control of template layout and design.</strong></p> 725 725 <p><label><input type="radio" name="theme" value="auto_wp" disabled="disabled" /> You must first install the [plugin name] before choosing this option</label></p> … … 730 730 <tr> 731 731 <th> 732 <h5><?php _e( 'Manually Up grade My WordPress Theme', 'buddypress' ) ?>'</h5>732 <h5><?php _e( 'Manually Update My WordPress Theme', 'buddypress' ) ?>'</h5> 733 733 <img src="<?php echo plugins_url( '/buddypress/bp-core/images/manual_theme.jpg' ) ?>" alt="bp-default" /> 734 734 </th> … … 805 805 806 806 <?php else : 807 $type = __( 'up grade', 'buddypress' ); ?>808 809 <h2>Up grade Complete!</h2>807 $type = __( 'update', 'buddypress' ); ?> 808 809 <h2>Update Complete!</h2> 810 810 811 811 <?php endif; ?> … … 831 831 /* Save Step Methods */ 832 832 833 function step_db_up grade_save() {833 function step_db_update_save() { 834 834 if ( isset( $_POST['submit'] ) ) { 835 check_admin_referer( 'bpwizard_db_up grade' );835 check_admin_referer( 'bpwizard_db_update' ); 836 836 837 837 if ( $this->current_version < 1225 ) 838 $this->up grade_1_3();838 $this->update_1_3(); 839 839 840 840 return true; … … 844 844 } 845 845 846 function step_ms_up grade_save() {846 function step_ms_update_save() { 847 847 global $current_blog; 848 848 849 849 if ( isset( $_POST['submit'] ) ) { 850 check_admin_referer( 'bpwizard_ms_up grade' );850 check_admin_referer( 'bpwizard_ms_update' ); 851 851 852 852 if ( !$disabled = get_option( 'bp-deactivated-components' ) ) … … 1096 1096 } 1097 1097 1098 /* Database up grade methods based on version numbers */1099 function up grade_1_3() {1100 // Run the schema install to up grade tables1098 /* Database update methods based on version numbers */ 1099 function update_1_3() { 1100 // Run the schema install to update tables 1101 1101 bp_core_install(); 1102 1102 … … 1123 1123 $bp_wizard = new BP_Core_Setup_Wizard; 1124 1124 } 1125 is_multisite() ? add_action( 'network_admin_menu', 'bp_core_setup_wizard_init' ) : add_action('admin_menu', 'bp_core_setup_wizard_init' );1125 add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'bp_core_setup_wizard_init' ); 1126 1126 1127 1127 … … 1162 1162 } 1163 1163 1164 function bp_core_up grade( $disabled ) {1164 function bp_core_update( $disabled ) { 1165 1165 global $wpdb; 1166 1166 … … 1168 1168 } 1169 1169 1170 function bp_up grade_db_stuff() {1170 function bp_update_db_stuff() { 1171 1171 // Rename the old user activity cached table if needed. 1172 1172 if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$wpdb->base_prefix}bp_activity_user_activity_cached%'" ) ) … … 1191 1191 bp_core_add_illegal_names(); 1192 1192 1193 // Up grade and remove the message threads table if it exists1193 // Update and remove the message threads table if it exists 1194 1194 if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$wpdb->base_prefix}bp_messages_threads%'" ) ) { 1195 $up grade = BP_Messages_Thread::upgrade_tables();1196 1197 if ( $up grade )1195 $update = BP_Messages_Thread::update_tables(); 1196 1197 if ( $update ) 1198 1198 $wpdb->query( "DROP TABLE {$wpdb->base_prefix}bp_messages_threads" ); 1199 1199 } … … 1245 1245 /* Alter thickbox screens so the entire plugin download and install interface is contained within. */ 1246 1246 function bp_core_wizard_thickbox() { 1247 ?> 1247 $form_action = is_multisite() ? network_admin_url( add_query_arg( array( 'page' => 'bp-wizard', 'updated' => '1' ), 'admin.php' ) ) : admin_url( add_query_arg( array( 'page' => 'bp-wizard', 'updated' => '1' ), 'admin.php' ) ); ?> 1248 1248 1249 <script type="text/javascript"> 1249 1250 jQuery('p.action-button a').attr( 'target', '' ); … … 1256 1257 jQuery('a').removeClass( 'thickbox thickbox-preview onclick' ); 1257 1258 jQuery('body.update-php div.wrap p:last').hide(); 1258 jQuery('body.update-php div.wrap p:last').after( '<p><a class="button" target="_parent" href="<?php echo site_url( '/wp-admin/admin.php?page=bp-wizard' ) ?>&updated=1"><?php _e( 'Finish', 'buddypress' ) ?> →</a></p>' );1259 jQuery('body.update-php div.wrap p:last').after( '<p><a class="button" target="_parent" href="<?php echo $form_action; ?>"><?php _e( 'Finish', 'buddypress' ) ?> →</a></p>' ); 1259 1260 } 1260 1261 </script> … … 1282 1283 $status = __( 'Setup', 'buddypress' ); 1283 1284 else 1284 $status = __( 'Up grade', 'buddypress' );1285 $status = __( 'Update', 'buddypress' ); 1285 1286 1286 1287 // Add the administration tab under the "Site Admin" tab for site administrators … … 1299 1300 add_action( "admin_print_styles-$hook", 'bp_core_add_admin_menu_styles' ); 1300 1301 } 1301 is_multisite() ? add_action( 'network_admin_menu', 'bp_core_add_admin_menu' ) : add_action( 'admin_menu','bp_core_add_admin_menu' );1302 add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'bp_core_add_admin_menu' ); 1302 1303 1303 1304 function bp_core_add_admin_menu_styles() { -
trunk/bp-forums.php
r3709 r3713 137 137 add_submenu_page( 'bp-general-settings', __( 'Forums Setup', 'buddypress' ), __( 'Forums Setup', 'buddypress' ), 'manage_options', 'bb-forums-setup', "bp_forums_bbpress_admin" ); 138 138 } 139 is_multisite() ? add_action( 'network_admin_menu', 'bp_forums_add_admin_menu' ) : add_action('admin_menu', 'bp_forums_add_admin_menu' );139 add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'bp_forums_add_admin_menu' ); 140 140 141 141 /* Forum Functions */ -
trunk/bp-forums/bp-forums-bbpress.php
r3369 r3713 65 65 /* This must be loaded before functionss.bb-admin.php otherwise we get a function conflict. */ 66 66 if ( !$tables_installed = (boolean) $bbdb->get_results( 'DESCRIBE `' . $bbdb->forums . '`;', ARRAY_A ) ) 67 require_once( ABSPATH . 'wp-admin/includes/up grade.php' );67 require_once( ABSPATH . 'wp-admin/includes/update.php' ); 68 68 69 69 require_once( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' ); … … 97 97 dbDelta( str_replace( ' IF NOT EXISTS', '', str_replace( '`', '', $bb_queries ) ) ); 98 98 99 require_once( BB_PATH . 'bb-admin/includes/functions.bb-up grade.php' );99 require_once( BB_PATH . 'bb-admin/includes/functions.bb-update.php' ); 100 100 bb_update_db_version(); 101 101 -
trunk/bp-loader.php
r3592 r3713 19 19 /*** 20 20 * Check if this is the first time BuddyPress has been loaded, or the first time 21 * since an up grade. If so, load the install/upgrade routine only.21 * since an update. If so, load the install/update routine only. 22 22 */ 23 23 if ( get_site_option( 'bp-db-version' ) < constant( 'BP_DB_VERSION' ) ) { 24 require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-up grade.php' );24 require_once( WP_PLUGIN_DIR . '/buddypress/bp-core/admin/bp-core-update.php' ); 25 25 26 26 /*** 27 * If the install or up grade routine is completed and everything is up to date27 * If the install or update routine is completed and everything is up to date 28 28 * continue loading BuddyPress as normal. 29 29 */ -
trunk/bp-messages/bp-messages-classes.php
r3542 r3713 206 206 } 207 207 208 /* Up grade Functions */209 210 function up grade_tables() {208 /* Update Functions */ 209 210 function update_tables() { 211 211 global $wpdb, $bp; 212 212 … … 214 214 $threads = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->base_prefix}bp_messages_threads" ) ); 215 215 216 /* Nothing to up grade, just return true to remove the table */216 /* Nothing to update, just return true to remove the table */ 217 217 if ( empty( $threads ) ) 218 218 return true; -
trunk/bp-themes/bp-default/style.css
r3681 r3713 12 12 ** IMPORTANT - DO NOT COPY THIS THEME ** 13 13 If you want to make a custom theme based on this theme, DO NOT copy and edit it. By 14 doing this you will make up grades and maintainence much harder for yourself.14 doing this you will make updates and maintainence much harder for yourself. 15 15 Instead, please read this codex page on how to build a BuddyPress child theme: 16 16 -
trunk/bp-xprofile.php
r3709 r3713 76 76 add_submenu_page( 'bp-general-settings', __( 'Profile Field Setup', 'buddypress' ), __( 'Profile Field Setup', 'buddypress' ), 'manage_options', 'bp-profile-setup', 'xprofile_admin' ); 77 77 } 78 is_multisite() ? add_action( 'network_admin_menu', 'xprofile_add_admin_menu' ) : add_action('admin_menu', 'xprofile_add_admin_menu' );78 add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'xprofile_add_admin_menu' ); 79 79 80 80 /** -
trunk/bp-xprofile/bp-xprofile-cssjs.php
r3709 r3713 8 8 } 9 9 } 10 is_multisite() ? add_action( 'network_admin_menu', 'xprofile_add_admin_css' ) : add_action('admin_menu', 'xprofile_add_admin_css' );10 add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'xprofile_add_admin_css' ); 11 11 12 12 function xprofile_add_admin_js() { … … 25 25 } 26 26 } 27 is_multisite() ? add_action( 'network_admin_menu', 'xprofile_add_admin_js' ) : add_action('admin_menu', 'xprofile_add_admin_js', 1 );27 add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'xprofile_add_admin_js', 1 ); 28 28 ?>
Note: See TracChangeset
for help on using the changeset viewer.