Skip to:
Content

BuddyPress.org

Ticket #2561: 2561.diff

File 2561.diff, 6.0 KB (added by wpmuguru, 14 years ago)
  • bp-friends.php

     
    1111        /* For internal identification */
    1212        $bp->friends->id = 'friends';
    1313
    14         $bp->friends->table_name = $wpdb->base_prefix . 'bp_friends';
     14        $bp->friends->table_name = bp_get_table_name( 'bp_friends' );
    1515        $bp->friends->format_notification_function = 'friends_format_notifications';
    1616        $bp->friends->slug = BP_FRIENDS_SLUG;
    1717
     
    609609add_action( 'friends_friendship_deleted', 'bp_core_clear_cache' );
    610610add_action( 'friends_friendship_requested', 'bp_core_clear_cache' );
    611611
    612 ?>
    613  No newline at end of file
     612?>
  • bp-activity.php

     
    1414        $bp->activity->name = $bp->pages->activity->name;
    1515        $bp->activity->slug = BP_ACTIVITY_SLUG;
    1616
    17         $bp->activity->table_name = $wpdb->base_prefix . 'bp_activity';
    18         $bp->activity->table_name_meta = $wpdb->base_prefix . 'bp_activity_meta';
     17        $bp->activity->table_name = bp_get_table_name( 'bp_activity' );
     18        $bp->activity->table_name_meta = bp_get_table_name( 'bp_activity_meta' );
    1919        $bp->activity->format_notification_function = 'bp_activity_format_notifications';
    2020
    2121        /* Register this in the active components array */
     
    11121112add_action( 'plugins_loaded', 'bp_register_activity_actions' );
    11131113
    11141114
    1115 ?>
    1116  No newline at end of file
     1115?>
  • bp-blogs.php

     
    1717        $bp->blogs->name = $bp->pages->blogs->name;
    1818        $bp->blogs->slug = BP_BLOGS_SLUG;
    1919
    20         $bp->blogs->table_name = $wpdb->base_prefix . 'bp_user_blogs';
    21         $bp->blogs->table_name_blogmeta = $wpdb->base_prefix . 'bp_user_blogs_blogmeta';
     20        $bp->blogs->table_name = bp_get_table_name( 'bp_user_blogs' );
     21        $bp->blogs->table_name_blogmeta = bp_get_table_name( 'bp_user_blogs_blogmeta' );
    2222        $bp->blogs->format_notification_function = 'bp_blogs_format_notifications';
    2323
    2424        /* Register this in the active components array */
     
    691691add_action( 'bp_blogs_new_blog', 'bp_core_clear_cache' );
    692692add_action( 'bp_blogs_remove_data', 'bp_core_clear_cache' );
    693693
    694 ?>
    695  No newline at end of file
     694?>
  • bp-messages.php

     
    1313        /* For internal identification */
    1414        $bp->messages->id = 'messages';
    1515
    16         $bp->messages->table_name_messages = $wpdb->base_prefix . 'bp_messages_messages';
    17         $bp->messages->table_name_recipients = $wpdb->base_prefix . 'bp_messages_recipients';
    18         $bp->messages->table_name_notices = $wpdb->base_prefix . 'bp_messages_notices';
     16        $bp->messages->table_name_messages = bp_get_table_name( 'bp_messages_messages' );
     17        $bp->messages->table_name_recipients = bp_get_table_name( 'bp_messages_recipients' );
     18        $bp->messages->table_name_notices = bp_get_table_name( 'bp_messages_notices' );
    1919        $bp->messages->format_notification_function = 'messages_format_notifications';
    2020        $bp->messages->slug = BP_MESSAGES_SLUG;
    2121
     
    515515add_action( 'messages_screen_sentbox', 'bp_core_clear_cache' );
    516516add_action( 'messages_screen_inbox', 'bp_core_clear_cache' );
    517517
    518 ?>
    519  No newline at end of file
     518?>
  • bp-groups.php

     
    1515        $bp->groups->name = $bp->pages->groups->name;
    1616        $bp->groups->slug = BP_GROUPS_SLUG;
    1717
    18         $bp->groups->table_name = $wpdb->base_prefix . 'bp_groups';
    19         $bp->groups->table_name_members = $wpdb->base_prefix . 'bp_groups_members';
    20         $bp->groups->table_name_groupmeta = $wpdb->base_prefix . 'bp_groups_groupmeta';
     18        $bp->groups->table_name = bp_get_table_name( 'bp_groups' );
     19        $bp->groups->table_name_members = bp_get_table_name( 'bp_groups_members' );
     20        $bp->groups->table_name_groupmeta = bp_get_table_name( 'bp_groups_groupmeta' );
    2121        $bp->groups->format_notification_function = 'groups_format_notifications';
    2222
    2323        /* Register this in the active components array */
     
    24712471add_action( 'groups_created_group', 'bp_core_clear_cache' );
    24722472add_action( 'groups_group_avatar_updated', 'bp_core_clear_cache' );
    24732473
    2474 ?>
    2475  No newline at end of file
     2474?>
  • bp-core.php

     
    159159        /* Used to determine if the logged in user is a moderator for the current content. */
    160160        $bp->is_item_mod = false;
    161161
    162         $bp->core->table_name_notifications = $wpdb->base_prefix . 'bp_notifications';
     162        $bp->core->table_name_notifications = bp_get_table_name( 'bp_notifications' );
    163163
    164164        if ( !$bp->current_component && $bp->displayed_user->id )
    165165                $bp->current_component = $bp->default_component;
     
    20632063        return false;
    20642064}
    20652065
    2066 ?>
    2067  No newline at end of file
     2066function bp_get_table_name( $bp_table ) {
     2067        global $wpdb;
     2068        return apply_filters( 'table_name_' . $bp_table, $wpdb->base_prefix . $bp_table );
     2069}
     2070?>
  • bp-xprofile.php

     
    2828        /* For internal identification */
    2929        $bp->profile->id = 'profile';
    3030
    31         $bp->profile->table_name_groups = $wpdb->base_prefix . 'bp_xprofile_groups';
    32         $bp->profile->table_name_fields = $wpdb->base_prefix . 'bp_xprofile_fields';
    33         $bp->profile->table_name_data = $wpdb->base_prefix . 'bp_xprofile_data';
     31        $bp->profile->table_name_groups = bp_get_table_name( 'bp_xprofile_groups' );
     32        $bp->profile->table_name_fields = bp_get_table_name( 'bp_xprofile_fields' );
     33        $bp->profile->table_name_data = bp_get_table_name( 'bp_xprofile_data' );
    3434
    3535        $bp->profile->format_notification_function = 'xprofile_format_notifications';
    3636        $bp->profile->slug = BP_XPROFILE_SLUG;