Changeset 3186
- Timestamp:
- 08/12/2010 06:33:05 AM (14 years ago)
- Location:
- branches/1.2
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-activity.php
r3167 r3186 74 74 75 75 function bp_activity_setup_globals() { 76 global $bp, $ wpdb, $current_blog;76 global $bp, $current_blog; 77 77 78 78 /* Internal identifier */ 79 79 $bp->activity->id = 'activity'; 80 80 81 $bp->activity->table_name = $wpdb->base_prefix . 'bp_activity';82 $bp->activity->table_name_meta = $wpdb->base_prefix . 'bp_activity_meta';83 81 $bp->activity->slug = BP_ACTIVITY_SLUG; 82 83 $bp->activity->table_name = $bp->table_prefix . 'bp_activity'; 84 $bp->activity->table_name_meta = $bp->table_prefix . 'bp_activity_meta'; 85 84 86 $bp->activity->format_notification_function = 'bp_activity_format_notifications'; 85 87 … … 92 94 93 95 function bp_activity_check_installed() { 94 global $ wpdb, $bp;96 global $bp; 95 97 96 98 if ( get_site_option( 'bp-activity-db-version' ) < BP_ACTIVITY_DB_VERSION ) … … 624 626 625 627 function bp_activity_add( $args = '' ) { 626 global $bp , $wpdb;628 global $bp; 627 629 628 630 $defaults = array( -
branches/1.2/bp-blogs.php
r3153 r3186 69 69 $bp->blogs->id = 'blogs'; 70 70 71 $bp->blogs->table_name = $wpdb->base_prefix . 'bp_user_blogs'; 72 $bp->blogs->table_name_blogmeta = $wpdb->base_prefix . 'bp_user_blogs_blogmeta'; 71 $bp->blogs->slug = BP_BLOGS_SLUG; 72 73 $bp->blogs->table_name = $bp->table_prefix . 'bp_user_blogs'; 74 $bp->blogs->table_name_blogmeta = $bp->table_prefix . 'bp_user_blogs_blogmeta'; 75 73 76 $bp->blogs->format_notification_function = 'bp_blogs_format_notifications'; 74 $bp->blogs->slug = BP_BLOGS_SLUG;75 77 76 78 /* Register this in the active components array */ -
branches/1.2/bp-core.php
r3185 r3186 85 85 */ 86 86 function bp_core_setup_globals() { 87 global $bp , $wpdb;87 global $bp; 88 88 global $current_user, $current_component, $current_action, $current_blog; 89 89 global $displayed_user_id; … … 91 91 92 92 $current_user = wp_get_current_user(); 93 94 /* Get the base database prefix */ 95 $bp->table_prefix = bp_core_get_table_prefix(); 93 96 94 97 /* The domain for the root of the site where the main blog resides */ … … 154 157 155 158 /* Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar */ 156 $bp->grav_default->user = apply_filters( 'bp_user_gravatar_default', $bp->site_options['user-avatar-default'] );159 $bp->grav_default->user = apply_filters( 'bp_user_gravatar_default', $bp->site_options['user-avatar-default'] ); 157 160 $bp->grav_default->group = apply_filters( 'bp_group_gravatar_default', 'identicon' ); 158 $bp->grav_default->blog = apply_filters( 'bp_blog_gravatar_default', 'identicon' );161 $bp->grav_default->blog = apply_filters( 'bp_blog_gravatar_default', 'identicon' ); 159 162 160 163 /* Fetch the full name for the logged in and current user */ 161 $bp->loggedin_user->fullname = bp_core_get_user_displayname( $bp->loggedin_user->id );164 $bp->loggedin_user->fullname = bp_core_get_user_displayname( $bp->loggedin_user->id ); 162 165 $bp->displayed_user->fullname = bp_core_get_user_displayname( $bp->displayed_user->id ); 163 166 … … 171 174 $bp->is_item_mod = false; 172 175 173 $bp->core->table_name_notifications = $ wpdb->base_prefix . 'bp_notifications';176 $bp->core->table_name_notifications = $bp->table_prefix . 'bp_notifications'; 174 177 175 178 if ( !$bp->current_component && $bp->displayed_user->id ) … … 199 202 add_action( 'bp_setup_root_components', 'bp_core_setup_root_uris' ); 200 203 204 /** 205 * bp_core_get_table_prefix() 206 * 207 * Allow filtering of database prefix. Intended for use in multinetwork installations. 208 * 209 * @global object $wpdb WordPress database object 210 * @return string Filtered database prefix 211 */ 212 function bp_core_get_table_prefix() { 213 global $wpdb; 214 215 return apply_filters( 'bp_core_get_table_prefix', $wpdb->base_prefix ); 216 } 201 217 202 218 /** … … 252 268 * @package BuddyPress Core 253 269 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals() 254 * @global $wpdb WordPress DB access object.255 270 * @global $current_user WordPress global variable containing current logged in user information 256 271 * @uses is_site_admin() returns true if the current user is a site admin, false if not … … 259 274 */ 260 275 function bp_core_check_installed() { 261 global $ wpdb, $bp;276 global $bp; 262 277 263 278 if ( !is_site_admin() ) … … 279 294 * @package BuddyPress Core 280 295 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals() 281 * @global $wpdb WordPress DB access object.282 296 * @uses is_site_admin() returns true if the current user is a site admin, false if not 283 297 * @uses add_submenu_page() WP function to add a submenu item … … 934 948 * @package BuddyPress Core 935 949 * @param $username str Username to check. 936 * @global $wpdb WordPress DB access object.937 950 * @return false on no match 938 951 * @return int the user ID of the matched user. … … 976 989 * @package BuddyPress Core 977 990 * @param $username str Username to check. 978 * @global $wpdb WordPress DB access object.979 991 * @return false on no match 980 992 * @return int the user ID of the matched user. 981 993 */ 982 994 function bp_core_get_random_member() { 983 global $bp , $wpdb;995 global $bp; 984 996 985 997 if ( isset( $_GET['random-member'] ) ) { … … 1709 1721 */ 1710 1722 function bp_core_delete_account( $user_id = false ) { 1711 global $bp, $wp db, $wp_version;1723 global $bp, $wp_version; 1712 1724 1713 1725 if ( !$user_id ) … … 1843 1855 */ 1844 1856 function bp_core_print_generation_time() { 1845 global $wpdb; 1846 ?> 1857 ?> 1847 1858 1848 1859 <!-- Generated in <?php timer_stop(1); ?> seconds. --> -
branches/1.2/bp-forums/bp-forums-admin.php
r3073 r3186 122 122 123 123 function bp_forums_bbpress_install() { 124 global $wpdb, $bbdb ;124 global $wpdb, $bbdb, $bp; 125 125 126 126 check_admin_referer( 'bp_forums_new_install_init' ); … … 141 141 "define( 'BB_LOGGED_I" => array( "'put your unique phrase here'", "'" . addslashes( LOGGED_IN_KEY ) . "'" ), 142 142 "define( 'BB_NONCE_KE" => array( "'put your unique phrase here'", "'" . addslashes( NONCE_KEY ) . "'" ), 143 "\$bb_table_prefix = '" => array( "'bb_'", "'" . $ wpdb->base_prefix . "bb_'" ),143 "\$bb_table_prefix = '" => array( "'bb_'", "'" . $bp->table_prefix . "bb_'" ), 144 144 "define( 'BB_LANG', '" => array( "''", "'" . WPLANG . "'" ) 145 145 ) -
branches/1.2/bp-friends.php
r3172 r3186 34 34 35 35 function friends_setup_globals() { 36 global $bp , $wpdb;36 global $bp; 37 37 38 38 /* For internal identification */ 39 39 $bp->friends->id = 'friends'; 40 40 41 $bp->friends->table_name = $wpdb->base_prefix . 'bp_friends'; 41 $bp->friends->slug = BP_FRIENDS_SLUG; 42 43 $bp->friends->table_name = $bp->table_prefix . 'bp_friends'; 44 42 45 $bp->friends->format_notification_function = 'friends_format_notifications'; 43 $bp->friends->slug = BP_FRIENDS_SLUG;44 46 45 47 /* Register this in the active components array */ … … 51 53 52 54 function friends_check_installed() { 53 global $ wpdb, $bp;55 global $bp; 54 56 55 57 if ( !is_site_admin() ) -
branches/1.2/bp-groups.php
r3178 r3186 75 75 $bp->groups->id = 'groups'; 76 76 77 $bp->groups->table_name = $wpdb->base_prefix . 'bp_groups'; 78 $bp->groups->table_name_members = $wpdb->base_prefix . 'bp_groups_members'; 79 $bp->groups->table_name_groupmeta = $wpdb->base_prefix . 'bp_groups_groupmeta'; 77 $bp->groups->slug = BP_GROUPS_SLUG; 78 79 $bp->groups->table_name = $bp->table_prefix . 'bp_groups'; 80 $bp->groups->table_name_members = $bp->table_prefix . 'bp_groups_members'; 81 $bp->groups->table_name_groupmeta = $bp->table_prefix . 'bp_groups_groupmeta'; 82 80 83 $bp->groups->format_notification_function = 'groups_format_notifications'; 81 $bp->groups->slug = BP_GROUPS_SLUG;82 84 83 85 /* Register this in the active components array */ -
branches/1.2/bp-messages.php
r3166 r3186 67 67 68 68 function messages_setup_globals() { 69 global $bp , $wpdb;69 global $bp; 70 70 71 71 /* For internal identification */ 72 72 $bp->messages->id = 'messages'; 73 73 74 $bp->messages->table_name_messages = $wpdb->base_prefix . 'bp_messages_messages'; 75 $bp->messages->table_name_recipients = $wpdb->base_prefix . 'bp_messages_recipients'; 76 $bp->messages->table_name_notices = $wpdb->base_prefix . 'bp_messages_notices'; 74 $bp->messages->slug = BP_MESSAGES_SLUG; 75 76 $bp->messages->table_name_notices = $bp->table_prefix . 'bp_messages_notices'; 77 $bp->messages->table_name_messages = $bp->table_prefix . 'bp_messages_messages'; 78 $bp->messages->table_name_recipients = $bp->table_prefix . 'bp_messages_recipients'; 79 77 80 $bp->messages->format_notification_function = 'messages_format_notifications'; 78 $bp->messages->slug = BP_MESSAGES_SLUG;79 81 80 82 /* Register this in the active components array */ … … 86 88 87 89 function messages_check_installed() { 88 global $ wpdb, $bp;90 global $bp; 89 91 90 92 if ( !is_site_admin() ) -
branches/1.2/bp-xprofile.php
r3145 r3186 105 105 $bp->profile->id = 'profile'; 106 106 107 $bp->profile->table_name_groups = $wpdb->base_prefix . 'bp_xprofile_groups'; 108 $bp->profile->table_name_fields = $wpdb->base_prefix . 'bp_xprofile_fields'; 109 $bp->profile->table_name_data = $wpdb->base_prefix . 'bp_xprofile_data'; 107 $bp->profile->slug = BP_XPROFILE_SLUG; 108 109 $bp->profile->table_name_data = $bp->table_prefix . 'bp_xprofile_data'; 110 $bp->profile->table_name_groups = $bp->table_prefix . 'bp_xprofile_groups'; 111 $bp->profile->table_name_fields = $bp->table_prefix . 'bp_xprofile_fields'; 110 112 111 113 $bp->profile->format_notification_function = 'xprofile_format_notifications'; 112 $bp->profile->slug = BP_XPROFILE_SLUG;113 114 114 115 /* Register this in the active components array */
Note: See TracChangeset
for help on using the changeset viewer.