Ticket #2561: 2561.diff
File 2561.diff, 6.0 KB (added by , 14 years ago) |
---|
-
bp-friends.php
11 11 /* For internal identification */ 12 12 $bp->friends->id = 'friends'; 13 13 14 $bp->friends->table_name = $wpdb->base_prefix . 'bp_friends';14 $bp->friends->table_name = bp_get_table_name( 'bp_friends' ); 15 15 $bp->friends->format_notification_function = 'friends_format_notifications'; 16 16 $bp->friends->slug = BP_FRIENDS_SLUG; 17 17 … … 609 609 add_action( 'friends_friendship_deleted', 'bp_core_clear_cache' ); 610 610 add_action( 'friends_friendship_requested', 'bp_core_clear_cache' ); 611 611 612 ?> 613 No newline at end of file 612 ?> -
bp-activity.php
14 14 $bp->activity->name = $bp->pages->activity->name; 15 15 $bp->activity->slug = BP_ACTIVITY_SLUG; 16 16 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' ); 19 19 $bp->activity->format_notification_function = 'bp_activity_format_notifications'; 20 20 21 21 /* Register this in the active components array */ … … 1112 1112 add_action( 'plugins_loaded', 'bp_register_activity_actions' ); 1113 1113 1114 1114 1115 ?> 1116 No newline at end of file 1115 ?> -
bp-blogs.php
17 17 $bp->blogs->name = $bp->pages->blogs->name; 18 18 $bp->blogs->slug = BP_BLOGS_SLUG; 19 19 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' ); 22 22 $bp->blogs->format_notification_function = 'bp_blogs_format_notifications'; 23 23 24 24 /* Register this in the active components array */ … … 691 691 add_action( 'bp_blogs_new_blog', 'bp_core_clear_cache' ); 692 692 add_action( 'bp_blogs_remove_data', 'bp_core_clear_cache' ); 693 693 694 ?> 695 No newline at end of file 694 ?> -
bp-messages.php
13 13 /* For internal identification */ 14 14 $bp->messages->id = 'messages'; 15 15 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' ); 19 19 $bp->messages->format_notification_function = 'messages_format_notifications'; 20 20 $bp->messages->slug = BP_MESSAGES_SLUG; 21 21 … … 515 515 add_action( 'messages_screen_sentbox', 'bp_core_clear_cache' ); 516 516 add_action( 'messages_screen_inbox', 'bp_core_clear_cache' ); 517 517 518 ?> 519 No newline at end of file 518 ?> -
bp-groups.php
15 15 $bp->groups->name = $bp->pages->groups->name; 16 16 $bp->groups->slug = BP_GROUPS_SLUG; 17 17 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' ); 21 21 $bp->groups->format_notification_function = 'groups_format_notifications'; 22 22 23 23 /* Register this in the active components array */ … … 2471 2471 add_action( 'groups_created_group', 'bp_core_clear_cache' ); 2472 2472 add_action( 'groups_group_avatar_updated', 'bp_core_clear_cache' ); 2473 2473 2474 ?> 2475 No newline at end of file 2474 ?> -
bp-core.php
159 159 /* Used to determine if the logged in user is a moderator for the current content. */ 160 160 $bp->is_item_mod = false; 161 161 162 $bp->core->table_name_notifications = $wpdb->base_prefix . 'bp_notifications';162 $bp->core->table_name_notifications = bp_get_table_name( 'bp_notifications' ); 163 163 164 164 if ( !$bp->current_component && $bp->displayed_user->id ) 165 165 $bp->current_component = $bp->default_component; … … 2063 2063 return false; 2064 2064 } 2065 2065 2066 ?> 2067 No newline at end of file 2066 function 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
28 28 /* For internal identification */ 29 29 $bp->profile->id = 'profile'; 30 30 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' ); 34 34 35 35 $bp->profile->format_notification_function = 'xprofile_format_notifications'; 36 36 $bp->profile->slug = BP_XPROFILE_SLUG;