Ticket #5563: 5563.03.patch
File 5563.03.patch, 1.6 KB (added by , 11 years ago) |
---|
-
bp-core/admin/bp-core-schema.php
52 52 bp_core_install_blog_tracking(); 53 53 54 54 // Install the signups table 55 bp_core_ install_signups();55 bp_core_maybe_install_signups(); 56 56 57 57 } 58 58 -
bp-core/bp-core-update.php
490 490 return false; 491 491 } 492 492 493 // Upgrade the signups table if needed 494 bp_core_maybe_upgrade_signups(); 495 493 496 // Try to install the sign-ups table 494 497 if ( ! is_multisite() && ! bp_core_signups_table_exists() ) { 495 498 bp_core_install_signups(); … … 523 526 return false; 524 527 } 525 528 526 // Actually upgrade the sign-ups table 527 if ( bp_core_maybe_install_signups() ) { 529 // check if 'wp_signups' table exists 530 if ( bp_core_signups_table_exists() ) { 531 global $wpdb; 532 533 // Never use bp_core_get_table_prefix() for any global users tables 534 $wpdb->signups = $wpdb->base_prefix . 'signups'; 535 536 // 'signup_id' column already exists; stop now! 537 // @see https://core.trac.wordpress.org/changeset/25179 538 if ( 1 === $wpdb->query( "SHOW COLUMNS FROM {$wpdb->signups} LIKE 'signup_id'" ) ) { 539 return false; 540 } 541 542 // We need to upgrade the signups table 528 543 bp_core_upgrade_signups(); 544 return true; 545 546 // 'wp_signups' table doesn't exist 547 } else { 548 return false; 529 549 } 530 550 531 // Return whether or not the table exists now532 return (bool) bp_core_signups_table_exists();533 551 } 534 552 535 553 /** Activation Actions ********************************************************/