Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/19/2011 05:01:39 PM (15 years ago)
Author:
boonebgorges
Message:

Modifies schema queries to use the filtered bp_core_get_table_prefix(). Fixes #3228. Props wpmuguru

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-update.php

    r4342 r4391  
    10991099
    11001100function bp_update_db_stuff() {
     1101        $bp_prefix = bp_core_get_table_prefix();
    11011102        // Rename the old user activity cached table if needed.
    1102         if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$wpdb->base_prefix}bp_activity_user_activity_cached%'" ) )
    1103                 $wpdb->query( "RENAME TABLE {$wpdb->base_prefix}bp_activity_user_activity_cached TO {$bp->activity->table_name}" );
     1103        if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$bp_prefix}bp_activity_user_activity_cached%'" ) )
     1104                $wpdb->query( "RENAME TABLE {$bp_prefix}bp_activity_user_activity_cached TO {$bp->activity->table_name}" );
    11041105
    11051106        // Rename fields from pre BP 1.2
    … …  
    11221123
    11231124        // Update and remove the message threads table if it exists
    1124         if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$wpdb->base_prefix}bp_messages_threads%'" ) ) {
     1125        if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$bp_prefix}bp_messages_threads%'" ) ) {
    11251126                $update = BP_Messages_Thread::update_tables();
    11261127
    11271128                if ( $update )
    1128                         $wpdb->query( "DROP TABLE {$wpdb->base_prefix}bp_messages_threads" );
     1129                        $wpdb->query( "DROP TABLE {$bp_prefix}bp_messages_threads" );
    11291130        }
    11301131
Note: See TracChangeset for help on using the changeset viewer.