Changeset 6583
- Timestamp:
- 12/10/2012 08:47:07 AM (12 years ago)
- Location:
- trunk/bp-core
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-schema.php
r6342 r6583 9 9 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 10 10 11 /* BuddyPress component DB schema */ 12 if ( !empty($wpdb->charset) ) 13 return "DEFAULT CHARACTER SET $wpdb->charset"; 14 15 return ''; 11 // BuddyPress component DB schema 12 return !empty( $wpdb->charset ) ? "DEFAULT CHARACTER SET {$wpdb->charset}" : ''; 16 13 } 17 14 … … 244 241 245 242 // These values should only be updated if they are not already present 246 if ( ! $base_group_name =bp_get_option( 'bp-xprofile-base-group-name' ) ) {247 bp_update_option( 'bp-xprofile-base-group-name', _x( ' Base', 'First XProfilegroup name', 'buddypress' ) );243 if ( ! bp_get_option( 'bp-xprofile-base-group-name' ) ) { 244 bp_update_option( 'bp-xprofile-base-group-name', _x( 'General', 'First field-group name', 'buddypress' ) ); 248 245 } 249 246 250 if ( ! $fullname_field_name =bp_get_option( 'bp-xprofile-fullname-field-name' ) ) {251 bp_update_option( 'bp-xprofile-fullname-field-name', _x( ' Name', 'XProfile fullname field name', 'buddypress' ) );247 if ( ! bp_get_option( 'bp-xprofile-fullname-field-name' ) ) { 248 bp_update_option( 'bp-xprofile-fullname-field-name', _x( 'Display Name', 'Display name field', 'buddypress' ) ); 252 249 } 253 250 … … 340 337 dbDelta( $sql ); 341 338 } 342 343 /**344 * I don't appear to be used anymore, but I'm here anyways. I was originally345 * used in olden days to update pre-1.1 schemas, but that was before we had346 * a legitimate update process. Keep me around just incase.347 *348 * @global WPDB $wpdb349 * @global BuddyPress $bp350 */351 function bp_update_db_stuff() {352 global $wpdb, $bp;353 354 $bp_prefix = bp_core_get_table_prefix();355 356 // Rename the old user activity cached table if needed.357 if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$bp_prefix}bp_activity_user_activity_cached%'" ) )358 $wpdb->query( "RENAME TABLE {$bp_prefix}bp_activity_user_activity_cached TO {$bp->activity->table_name}" );359 360 // Rename fields from pre BP 1.2361 if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$bp->activity->table_name}%'" ) ) {362 if ( $wpdb->get_var( "SHOW COLUMNS FROM {$bp->activity->table_name} LIKE 'component_action'" ) ) {363 $wpdb->query( "ALTER TABLE {$bp->activity->table_name} CHANGE component_action type varchar(75) NOT NULL" );364 }365 366 if ( $wpdb->get_var( "SHOW COLUMNS FROM {$bp->activity->table_name} LIKE 'component_name'" ) ) {367 $wpdb->query( "ALTER TABLE {$bp->activity->table_name} CHANGE component_name component varchar(75) NOT NULL" );368 }369 }370 371 // On first installation - record all existing blogs in the system.372 if ( !(int) $bp->site_options['bp-blogs-first-install'] ) {373 bp_blogs_record_existing_blogs();374 bp_update_option( 'bp-blogs-first-install', 1 );375 }376 377 if ( is_multisite() ) {378 bp_core_add_illegal_names();379 }380 381 // Update and remove the message threads table if it exists382 if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$bp_prefix}bp_messages_threads%'" ) ) {383 if ( BP_Messages_Thread::update_tables() ) {384 $wpdb->query( "DROP TABLE {$bp_prefix}bp_messages_threads" );385 }386 }387 388 } -
trunk/bp-core/deprecated/1.5.php
r6474 r6583 13 13 /** Loader ********************************************************************/ 14 14 15 /** 16 * @deprecated BuddyPress (1.5) 17 */ 15 18 function bp_setup_root_components() { 16 19 do_action( 'bp_setup_root_components' ); … … 26 29 * Use is_multisite() instead. 27 30 * 28 * @deprecated 1.531 * @deprecated BuddyPress (1.5) 29 32 * @deprecated Use is_multisite() 30 33 */ … … 39 42 * Checks if current blog is root blog of site. Deprecated in 1.5. 40 43 * 41 * @deprecated 1.544 * @deprecated BuddyPress (1.5) 42 45 * @deprecated Use is_main_site() 43 46 * @package BuddyPress … … 54 57 * WPMU version of is_super_admin() 55 58 * 56 * @deprecated 1.559 * @deprecated BuddyPress (1.5) 57 60 * @deprecated Use is_super_admin() 58 61 * @param int $user_id Optional. Defaults to logged-in user … … 72 75 * that allowed positioning of menus. Deprecated in 1.5 in favour of a WP core function. 73 76 * 74 * @deprecated 1.577 * @deprecated BuddyPress (1.5) 75 78 * @deprecated Use add_menu_page(). 76 79 * @since BuddyPress (1.1) … … 118 121 /** Activity ******************************************************************/ 119 122 123 /** 124 * @deprecated BuddyPress (1.5) 125 */ 120 126 function bp_is_activity_permalink() { 121 127 _deprecated_function( __FUNCTION__, '1.5', 'bp_is_single_activity' ); … … 125 131 /** Core **********************************************************************/ 126 132 133 /** 134 * @deprecated BuddyPress (1.5) 135 */ 127 136 function bp_core_get_wp_profile() { 128 137 _deprecated_function( __FUNCTION__, '1.5' ); 129 130 global $bp;131 138 132 139 $ud = get_userdata( bp_displayed_user_id() ); ?> … … 197 204 } 198 205 206 /** 207 * @deprecated BuddyPress (1.5) 208 * @deprecated Use bp_is_my_profile() 209 */ 199 210 function bp_is_home() { 200 211 _deprecated_function( __FUNCTION__, '1.5', 'bp_is_my_profile' ); … … 205 216 * Is the user on the front page of the site? 206 217 * 207 * @deprecated 1.5218 * @deprecated BuddyPress (1.5) 208 219 * @deprecated Use is_front_page() 209 220 * @return bool … … 217 228 * Is the front page of the site set to the Activity component? 218 229 * 219 * @deprecated 1.5230 * @deprecated BuddyPress (1.5) 220 231 * @deprecated Use bp_is_component_front_page( 'activity' ) 221 232 * @return bool … … 226 237 } 227 238 239 /** 240 * @deprecated BuddyPress (1.5) 241 * @deprecated use bp_is_user() 242 */ 228 243 function bp_is_member() { 229 244 _deprecated_function( __FUNCTION__, '1.5', 'bp_is_user' ); … … 231 246 } 232 247 248 /** 249 * @deprecated BuddyPress (1.5) 250 * @deprecated use bp_loggedin_user_link() 251 */ 233 252 function bp_loggedinuser_link() { 234 253 _deprecated_function( __FUNCTION__, '1.5', 'bp_logged_in_user_link' ); … … 240 259 * Deprecated in 1.5; not used anymore. 241 260 * 261 * @deprecated BuddyPress (1.5) 242 262 * @return bool 243 263 */ … … 250 270 * Template tag version of bp_get_page_title() 251 271 * 252 * @deprecated 1.5272 * @deprecated BuddyPress (1.5) 253 273 * @deprecated Use wp_title() 254 274 * @since BuddyPress (1.0) … … 261 281 * Now, just simply use wp_title(). 262 282 * 263 * @deprecated 1.5283 * @deprecated BuddyPress (1.5) 264 284 * @deprecated Use wp_title() 265 285 * @since BuddyPress (1.0) … … 278 298 * Generate a link to log out. Last used in BP 1.2-beta. You should be using wp_logout_url(). 279 299 * 280 * @deprecated 1.5300 * @deprecated BuddyPress (1.5) 281 301 * @deprecated Use wp_logout_url() 282 302 * @since BuddyPress (1.0) … … 292 312 * Send an email and a BP notification on receipt of an @-mention in a group 293 313 * 294 * @deprecated 1.5314 * @deprecated BuddyPress (1.5) 295 315 * @deprecated Deprecated in favor of the more general bp_activity_at_message_notification() 296 316 */ 297 317 function groups_at_message_notification( $content, $poster_user_id, $group_id, $activity_id ) { 298 global $bp;299 300 318 _deprecated_function( __FUNCTION__, '1.5', 'bp_activity_at_message_notification()' ); 301 319 … … 361 379 /** 362 380 * BP 1.5 simplified notification functions a bit 381 * @deprecated BuddyPress (1.5) 363 382 */ 364 383 function bp_core_delete_notifications_for_user_by_type( $user_id, $component_name, $component_action ) { … … 374 393 /** 375 394 * In BP 1.5, these functions were renamed for greater consistency 395 * @deprecated BuddyPress (1.5) 376 396 */ 377 397 function bp_forum_directory_permalink() { … … 386 406 /** 387 407 * Last used by core in BP 1.1. The markup was merged into DTheme's header.php template. 408 * @deprecated BuddyPress (1.5) 388 409 */ 389 410 function bp_search_form() { … … 405 426 /** 406 427 * Some _is_ function had their names normalized 428 * @deprecated BuddyPress (1.5) 407 429 */ 408 430 function bp_is_profile_edit() { … … 411 433 } 412 434 435 /** 436 * @deprecated BuddyPress (1.5) 437 */ 413 438 function bp_is_change_avatar() { 414 439 _deprecated_function( __FUNCTION__, '1.5', 'bp_is_user_change_avatar()' ); … … 416 441 } 417 442 443 /** 444 * @deprecated BuddyPress (1.5) 445 */ 418 446 function bp_is_friend_requests() { 419 447 _deprecated_function( __FUNCTION__, '1.5', 'bp_is_user_friend_requests()' ); … … 426 454 * You should be using bp_is_root_component(). 427 455 * 428 * @deprecated 1.5456 * @deprecated BuddyPress (1.5) 429 457 * @deprecated bp_is_root_component() 430 458 * @return true if root component, else false. … … 441 469 * in BuddyPress 1.5. 442 470 * 471 * @deprecated BuddyPress (1.5) 443 472 * @since BuddyPress (1.5) 444 473 */ … … 450 479 * include "Activity Stream." As of 1.5.x, it is no longer required. 451 480 * 452 * @deprecated 1.5481 * @deprecated BuddyPress (1.5) 453 482 * @deprecated No longer required. 454 483 * @param string $page_html A list of pages as a dropdown (select list) … … 468 497 * As of 1.5.x, it is no longer required. 469 498 * 470 * @deprecated 1.5499 * @deprecated BuddyPress (1.5) 471 500 * @deprecated No longer required. 472 501 * @param $string $oldvalue Previous value of get_option( 'page_on_front' ) … … 489 518 * As of 1.5.x, it is no longer required. 490 519 * 491 * @deprecated 1.5520 * @deprecated BuddyPress (1.5) 492 521 * @deprecated No longer required. 493 522 * @param string $template Absolute path to the page template … … 506 535 * As of 1.5.x, it is no longer required. 507 536 * 508 * @deprecated 1.5537 * @deprecated BuddyPress (1.5) 509 538 * @deprecated No longer required. 510 539 * @since BuddyPress (1.2) … … 520 549 * As of 1.5.x, it is no longer required. 521 550 * 522 * @deprecated 1.5551 * @deprecated BuddyPress (1.5) 523 552 * @deprecated No longer required. 524 553 * @param array $posts Posts as retrieved by WP_Query … … 537 566 * As of 1.5.x, we recommend that you enqueue the comment-reply javascript in your theme's header.php. 538 567 * 539 * @deprecated 1.5568 * @deprecated BuddyPress (1.5) 540 569 * @deprecated Enqueue the comment-reply script in your theme's header.php. 541 570 * @since BuddyPress (1.2) -
trunk/bp-core/deprecated/1.6.php
r6448 r6583 9 9 */ 10 10 11 // Exit if accessed directly 12 if ( !defined( 'ABSPATH' ) ) exit; 13 11 14 /** Toolbar functions *********************************************************/ 12 15 16 /** 17 * @deprecated BuddyPress (1.6) 18 */ 13 19 function bp_admin_bar_remove_wp_menus() { 14 20 _deprecated_function( __FUNCTION__, '1.6' ); 15 21 } 16 22 23 /** 24 * @deprecated BuddyPress (1.6) 25 */ 17 26 function bp_admin_bar_root_site() { 18 27 _deprecated_function( __FUNCTION__, '1.6' ); 19 28 } 20 29 30 /** 31 * @deprecated BuddyPress (1.6) 32 */ 21 33 function bp_admin_bar_my_sites_menu() { 22 34 _deprecated_function( __FUNCTION__, '1.6' ); 23 35 } 24 36 25 function bp_admin_bar_comments_menu( $wp_admin_bar ) { 26 _deprecated_function( __FUNCTION__, '1.6' ); 27 } 28 37 /** 38 * @deprecated BuddyPress (1.6) 39 */ 40 function bp_admin_bar_comments_menu( $wp_admin_bar = '' ) { 41 _deprecated_function( __FUNCTION__, '1.6' ); 42 } 43 44 /** 45 * @deprecated BuddyPress (1.6) 46 */ 29 47 function bp_admin_bar_appearance_menu() { 30 48 _deprecated_function( __FUNCTION__, '1.6' ); 31 49 } 32 50 51 /** 52 * @deprecated BuddyPress (1.6) 53 */ 33 54 function bp_admin_bar_updates_menu() { 34 55 _deprecated_function( __FUNCTION__, '1.6' ); 35 56 } 36 57 58 /** 59 * @deprecated BuddyPress (1.6) 60 */ 37 61 function bp_members_admin_bar_my_account_logout() { 38 62 _deprecated_function( __FUNCTION__, '1.6' ); 39 63 } 40 64 65 /** 66 * @deprecated BuddyPress (1.6) 67 */ 41 68 function bp_core_is_user_deleted( $user_id = 0 ) { 42 69 _deprecated_function( __FUNCTION__, '1.6' ); … … 44 71 } 45 72 73 /** 74 * @deprecated BuddyPress (1.6) 75 */ 46 76 function bp_core_is_user_spammer( $user_id = 0 ) { 47 77 _deprecated_function( __FUNCTION__, '1.6' ); … … 55 85 56 86 /** 57 * @deprecated 1.687 * @deprecated BuddyPress (1.6) 58 88 * @deprecated No longer used; see bp_blogs_transition_activity_status() 59 89 */ … … 67 97 68 98 /** 69 * @deprecated 1.699 * @deprecated BuddyPress (1.6) 70 100 * @deprecated No longer used; see BP_Admin::admin_menus() 71 101 */ … … 75 105 76 106 /** 77 * @deprecated 1.6107 * @deprecated BuddyPress (1.6) 78 108 * @deprecated No longer used. We do ajax properly now. 79 109 */ … … 89 119 * Displays Friends header tabs 90 120 * 91 * @deprecated 1.6121 * @deprecated BuddyPress (1.6) 92 122 * @deprecated No longer used 93 123 */ … … 107 137 * Filters the title for the Friends component 108 138 * 109 * @deprecated 1.6139 * @deprecated BuddyPress (1.6) 110 140 * @deprecated No longer used 111 141 */ … … 129 159 130 160 131 /** 132 * Groups functions 133 */ 134 135 /** 136 * @deprecated 1.6 161 /** Groups functions **********************************************************/ 162 163 /** 164 * @deprecated BuddyPress (1.6) 137 165 * @deprecated Renamed to groups_get_id() for greater consistency 138 166 */ … … 142 170 } 143 171 144 /** 145 * Admin functions 146 */ 172 /** Admin functions ***********************************************************/ 147 173 148 174 /** 149 175 * Loads admin panel styles and scripts. 150 176 * 151 * @deprecated 1.6 152 * @deprecated No longer used. 177 * @deprecated BuddyPress (1.6) 153 178 */ 154 179 function bp_core_add_admin_menu_styles() { … … 156 181 } 157 182 158 /** 159 * Activity functions 160 */ 161 162 /** 163 * @deprecated 1.6 164 * @deprecated No longer used. Renamed to bp_activity_register_activity_actions(). 183 /** Activity functions ********************************************************/ 184 185 /** 186 * @deprecated BuddyPress (1.6) 165 187 */ 166 188 function updates_register_activity_actions() { … … 171 193 * Sets the "From" address in emails sent 172 194 * 173 * @deprecated 1.6 174 * @deprecated No longer used. 195 * @deprecated BuddyPress (1.6) 175 196 * @return noreply@sitedomain email address 176 197 */ … … 198 219 * Note that this hack only runs if the function bp_dtheme_register_actions() is not found (this 199 220 * function was introduced in BP 1.6 for related backward compatibility reasons). 221 * 222 * @deprecated BuddyPress (1.6) 200 223 */ 201 224 if ( !function_exists( 'bp_dtheme_register_actions' ) ) : … … 250 273 add_action( 'after_setup_theme', 'bp_die_legacy_ajax_callbacks', 20 ); 251 274 endif; 252 -
trunk/bp-core/deprecated/1.7.php
r6558 r6583 15 15 * 16 16 * @since BuddyPress (1.6) 17 * @deprecated BuddyPress (1.7) 17 18 * @uses bp_get_maintenance_mode() To get the BuddyPress maintenance mode 18 19 */ … … 24 25 * 25 26 * @since BuddyPress (1.6) 27 * @deprecated BuddyPress (1.7) 26 28 * @return string The BuddyPress maintenance mode 27 29 */ … … 30 32 } 31 33 34 /** 35 * @deprecated BuddyPress (1.7) 36 */ 32 37 function xprofile_get_profile() { 33 38 _deprecated_function( __FUNCTION__, '1.7' ); … … 35 40 } 36 41 42 /** 43 * @deprecated BuddyPress (1.7) 44 */ 37 45 function bp_get_profile_header() { 38 46 _deprecated_function( __FUNCTION__, '1.7' ); … … 40 48 } 41 49 50 /** 51 * @deprecated BuddyPress (1.7) 52 * @param string $component_name 53 * @return boolean 54 */ 42 55 function bp_exists( $component_name ) { 43 56 _deprecated_function( __FUNCTION__, '1.7' ); … … 48 61 } 49 62 63 /** 64 * @deprecated BuddyPress (1.7) 65 */ 50 66 function bp_get_plugin_sidebar() { 51 67 _deprecated_function( __FUNCTION__, '1.7' ); … … 59 75 * step. It also means that the themes won't show for selection on other blogs. 60 76 * 77 * @deprecated BuddyPress (1.7) 61 78 * @package BuddyPress Core 62 79 */ … … 91 108 * The administrator will be shown a notice for each check that fails. 92 109 * 110 * @deprecated BuddyPress (1.7) 93 111 * @package BuddyPress Core 94 112 */ … … 211 229 } 212 230 } 231 232 /** 233 * This function was originally used to update pre-1.1 schemas, but that was 234 * before we had a legitimate update process. 235 * 236 * @deprecated BuddyPress (1.7) 237 * @global WPDB $wpdb 238 */ 239 function bp_update_db_stuff() { 240 global $wpdb; 241 242 $bp = buddypress(); 243 $bp_prefix = bp_core_get_table_prefix(); 244 245 // Rename the old user activity cached table if needed. 246 if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$bp_prefix}bp_activity_user_activity_cached%'" ) ) { 247 $wpdb->query( "RENAME TABLE {$bp_prefix}bp_activity_user_activity_cached TO {$bp->activity->table_name}" ); 248 } 249 250 // Rename fields from pre BP 1.2 251 if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$bp->activity->table_name}%'" ) ) { 252 if ( $wpdb->get_var( "SHOW COLUMNS FROM {$bp->activity->table_name} LIKE 'component_action'" ) ) { 253 $wpdb->query( "ALTER TABLE {$bp->activity->table_name} CHANGE component_action type varchar(75) NOT NULL" ); 254 } 255 256 if ( $wpdb->get_var( "SHOW COLUMNS FROM {$bp->activity->table_name} LIKE 'component_name'" ) ) { 257 $wpdb->query( "ALTER TABLE {$bp->activity->table_name} CHANGE component_name component varchar(75) NOT NULL" ); 258 } 259 } 260 261 // On first installation - record all existing blogs in the system. 262 if ( !(int) $bp->site_options['bp-blogs-first-install'] ) { 263 bp_blogs_record_existing_blogs(); 264 bp_update_option( 'bp-blogs-first-install', 1 ); 265 } 266 267 if ( is_multisite() ) { 268 bp_core_add_illegal_names(); 269 } 270 271 // Update and remove the message threads table if it exists 272 if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$bp_prefix}bp_messages_threads%'" ) ) { 273 if ( BP_Messages_Thread::update_tables() ) { 274 $wpdb->query( "DROP TABLE {$bp_prefix}bp_messages_threads" ); 275 } 276 } 277 }
Note: See TracChangeset
for help on using the changeset viewer.