Changeset 13886 for trunk/src/bp-core/admin/bp-core-admin-schema.php
- Timestamp:
- 06/01/2024 07:41:30 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-schema.php
r13497 r13886 22 22 */ 23 23 function bp_core_install( $active_components = false ) { 24 25 24 bp_pre_schema_upgrade(); 26 25 … … 45 44 46 45 // Notifications. 47 if ( ! empty( $active_components['notifications'] ) ) {46 if ( ! empty( $active_components['notifications'] ) ) { 48 47 bp_core_install_notifications(); 49 48 } 50 49 51 50 // Friend Connections. 52 if ( ! empty( $active_components['friends'] ) ) {51 if ( ! empty( $active_components['friends'] ) ) { 53 52 bp_core_install_friends(); 54 53 } 55 54 56 55 // Extensible Groups. 57 if ( ! empty( $active_components['groups'] ) ) {56 if ( ! empty( $active_components['groups'] ) ) { 58 57 bp_core_install_groups(); 59 58 } 60 59 61 60 // Private Messaging. 62 if ( ! empty( $active_components['messages'] ) ) {61 if ( ! empty( $active_components['messages'] ) ) { 63 62 bp_core_install_private_messaging(); 64 63 } 65 64 66 65 // Extended Profiles. 67 if ( ! empty( $active_components['xprofile'] ) ) {66 if ( ! empty( $active_components['xprofile'] ) ) { 68 67 bp_core_install_extended_profiles(); 69 68 } 70 69 71 70 // Blog tracking. 72 if ( ! empty( $active_components['blogs'] ) ) {71 if ( ! empty( $active_components['blogs'] ) ) { 73 72 bp_core_install_blog_tracking(); 74 73 } … … 79 78 * 80 79 * @since 1.0.0 81 *82 80 */ 83 81 function bp_core_install_notifications() { … … 120 118 * 121 119 * @since 1.0.0 122 *123 120 */ 124 121 function bp_core_install_activity_streams() { … … 170 167 * 171 168 * @since 1.0.0 172 *173 169 */ 174 170 function bp_core_install_friends() { … … 195 191 * 196 192 * @since 1.0.0 197 *198 193 */ 199 194 function bp_core_install_groups() { … … 254 249 * 255 250 * @since 1.0.0 256 *257 251 */ 258 252 function bp_core_install_private_messaging() { … … 312 306 * @since 1.0.0 313 307 * 308 * @global wpdb $wpdb WordPress database object. 314 309 */ 315 310 function bp_core_install_extended_profiles() { … … 404 399 * 405 400 * @since 1.0.0 406 *407 401 */ 408 402 function bp_core_install_blog_tracking() { … … 444 438 445 439 // Signups is not there and we need it so let's create it. 446 require_once ( buddypress()->plugin_dir . '/bp-core/admin/bp-core-admin-schema.php' );447 require_once ( ABSPATH . 'wp-admin/includes/upgrade.php' );440 require_once buddypress()->plugin_dir . '/bp-core/admin/bp-core-admin-schema.php'; 441 require_once ABSPATH . 'wp-admin/includes/upgrade.php'; 448 442 449 443 // Never use bp_core_get_table_prefix() for any global users tables. … … 459 453 // Filter out all the queries except wp_signups. 460 454 foreach ( $create_queries as $key => $query ) { 461 if ( preg_match( "|CREATE TABLE ([^ ]*)|", $query, $matches ) ) {455 if ( preg_match( '|CREATE TABLE ([^ ]*)|', $query, $matches ) ) { 462 456 if ( trim( $matches[1], '`' ) !== $wpdb->signups ) { 463 457 unset( $create_queries[ $key ] ); … … 540 534 foreach ( $tt_ids as $tt_id ) { 541 535 $term = get_term_by( 'term_taxonomy_id', (int) $tt_id, bp_get_email_tax_type() ); 542 wp_update_term( (int) $term->term_id, bp_get_email_tax_type(), array( 543 'description' => $descriptions[ $id ], 544 ) ); 536 wp_update_term( 537 (int) $term->term_id, 538 bp_get_email_tax_type(), 539 array( 540 'description' => $descriptions[ $id ], 541 ) 542 ); 545 543 } 546 544 } … … 569 567 $charset_collate = $GLOBALS['wpdb']->get_charset_collate(); 570 568 $bp_prefix = bp_core_get_table_prefix(); 571 $sql[] = "CREATE TABLE {$bp_prefix}bp_invitations (569 $sql[] = "CREATE TABLE {$bp_prefix}bp_invitations ( 572 570 id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, 573 571 user_id bigint(20) NOT NULL, … … 616 614 $optouts_class = new BP_Optout(); 617 615 $table_name = $optouts_class->get_table_name(); 618 $sql = "CREATE TABLE {$table_name} (616 $sql = "CREATE TABLE {$table_name} ( 619 617 id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY, 620 618 email_address_hash varchar(255) NOT NULL,
Note: See TracChangeset
for help on using the changeset viewer.