Changeset 3357
- Timestamp:
- 11/05/2010 09:37:15 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
-
bp-core.php (modified) (4 diffs)
-
bp-core/bp-core-avatars.php (modified) (1 diff)
-
bp-core/bp-core-catchuri.php (modified) (3 diffs)
-
bp-core/bp-core-notifications.php (modified) (1 diff)
-
bp-core/bp-core-templatetags.php (modified) (1 diff)
-
bp-forums.php (modified) (2 diffs)
-
bp-groups.php (modified) (1 diff)
-
bp-messages.php (modified) (1 diff)
-
bp-xprofile/bp-xprofile-classes.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r3354 r3357 147 147 148 148 /* Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar */ 149 $bp->grav_default->user = apply_filters( 'bp_user_gravatar_default', $bp->site_options['user-avatar-default'] ); 149 $default_grav = isset( $bp->site_options['user-avatar-default'] ) ? $bp->site_options['user-avatar-default'] : 'wavatar'; 150 $bp->grav_default->user = apply_filters( 'bp_user_gravatar_default', $default_grav ); 150 151 $bp->grav_default->group = apply_filters( 'bp_group_gravatar_default', 'identicon' ); 151 152 $bp->grav_default->blog = apply_filters( 'bp_blog_gravatar_default', 'identicon' ); … … 1018 1019 $ud = false; 1019 1020 1020 if ( $bp->loggedin_user->id == $user_id )1021 if ( isset( $bp->loggedin_user->id ) && $bp->loggedin_user->id == $user_id ) 1021 1022 $ud = &$bp->loggedin_user->userdata; 1022 1023 1023 if ( $bp->displayed_user->id == $user_id )1024 if ( isset( $bp->displayed_user->id ) && $bp->displayed_user->id == $user_id ) 1024 1025 $ud = &$bp->displayed_user->userdata; 1025 1026 … … 1138 1139 if ( !$fullname = wp_cache_get( 'bp_user_fullname_' . $user_id, 'bp' ) ) { 1139 1140 if ( bp_is_active( 'xprofile' ) ) { 1140 $fullname = xprofile_get_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $user_id );1141 $fullname = xprofile_get_field_data( $bp->site_options['bp-xprofile-fullname-field-name'], $user_id ); 1141 1142 1142 1143 if ( empty($fullname) ) { … … 1315 1316 global $bp; 1316 1317 1317 if ( empty( $bp->template_message ) )1318 if ( empty( $bp->template_message ) && isset( $_COOKIE['bp-message'] ) ) 1318 1319 $bp->template_message = $_COOKIE['bp-message']; 1319 1320 1320 if ( empty( $bp->template_message_type ) )1321 if ( empty( $bp->template_message_type ) && isset( $_COOKIE['bp-message-type'] ) ) 1321 1322 $bp->template_message_type = $_COOKIE['bp-message-type']; 1322 1323 -
trunk/bp-core/bp-core-avatars.php
r3343 r3357 33 33 34 34 if ( !defined( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE' ) ) { 35 if ( ! $bp->site_options['fileupload_maxk'])35 if ( !isset( $bp->site_options['fileupload_maxk'] ) ) 36 36 define( 'BP_AVATAR_ORIGINAL_MAX_FILESIZE', 5120000 ); /* 5mb */ 37 37 else -
trunk/bp-core/bp-core-catchuri.php
r3324 r3357 164 164 unset( $bp_uri[$i] ); 165 165 166 $current_component = $bp_uri[$uri_offset];166 $current_component = isset( $bp_uri[$uri_offset] ) ? $bp_uri[$uri_offset] : ''; 167 167 } 168 168 } … … 185 185 186 186 // Set the current action 187 $current_action = $bp_uri[$i];187 $current_action = isset( $bp_uri[$i] ) ? $bp_uri[$i] : ''; 188 188 189 189 // Unset the current_component and action from action_variables … … 195 195 196 196 // Remove the username from action variables if this is not a VHOST install 197 if ( 'no' == VHOST && !$is_root_component )197 if ( defined( 'VHOST' ) && 'no' == VHOST && !$is_root_component ) 198 198 array_shift($bp_uri); 199 199 -
trunk/bp-core/bp-core-notifications.php
r3300 r3357 43 43 for ( $i = 0; $i < count($notifications); $i++ ) { 44 44 $notification = $notifications[$i]; 45 46 45 $grouped_notifications[$notification->component_name][$notification->component_action][] = $notification; 47 46 } 48 47 49 if ( !$grouped_notifications)48 if ( empty( $grouped_notifications ) ) 50 49 return false; 51 50 -
trunk/bp-core/bp-core-templatetags.php
r3341 r3357 1569 1569 global $bp; 1570 1570 1571 if ( BP_BLOGS_SLUG == $bp->current_component )1571 if ( is_multisite() && BP_BLOGS_SLUG == $bp->current_component ) 1572 1572 return true; 1573 1573 -
trunk/bp-forums.php
r3347 r3357 21 21 22 22 $bp->forums->image_base = BP_PLUGIN_URL . '/bp-forums/images'; 23 $bp->forums->bbconfig = $bp->site_options['bb-config-location'];24 23 $bp->forums->slug = BP_FORUMS_SLUG; 24 25 if ( isset( $bp->site_options['bb-config-location'] ) ) 26 $bp->forums->bbconfig = $bp->site_options['bb-config-location']; 25 27 26 28 /* Register this in the active components array */ … … 536 538 global $bp, $wp_roles, $bb_table_prefix; 537 539 540 if ( !isset( $bp->loggedin_user->id ) ) 541 return $allcaps; 542 538 543 $bb_cap = get_user_meta( $bp->loggedin_user->id, $bb_table_prefix . 'capabilities', true ); 539 544 -
trunk/bp-groups.php
r3347 r3357 166 166 global $bp; 167 167 168 if ( !$bp->groups->current_group)168 if ( empty( $bp->groups->current_group ) ) 169 169 return false; 170 170 -
trunk/bp-messages.php
r3300 r3357 41 41 42 42 /* Add the subnav items to the profile */ 43 bp_core_new_subnav_item( array( 'name' => __( 'Inbox', 'buddypress' ) . $count_indicator, 'slug' => 'inbox', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_inbox', 'position' => 10, 'user_has_access' => bp_is_my_profile() ) );43 bp_core_new_subnav_item( array( 'name' => __( 'Inbox', 'buddypress' ), 'slug' => 'inbox', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_inbox', 'position' => 10, 'user_has_access' => bp_is_my_profile() ) ); 44 44 bp_core_new_subnav_item( array( 'name' => __( 'Sent Messages', 'buddypress' ), 'slug' => 'sentbox', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_sentbox', 'position' => 20, 'user_has_access' => bp_is_my_profile() ) ); 45 45 bp_core_new_subnav_item( array( 'name' => __( 'Compose', 'buddypress' ), 'slug' => 'compose', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_compose', 'position' => 30, 'user_has_access' => bp_is_my_profile() ) ); -
trunk/bp-xprofile/bp-xprofile-classes.php
r3300 r3357 474 474 global $wpdb, $bp; 475 475 476 if ( !$bp->profile->table_name_fields || !$field_name)476 if ( empty( $bp->profile->table_name_fields ) || !isset( $field_name ) ) 477 477 return false; 478 478
Note: See TracChangeset
for help on using the changeset viewer.