Changeset 1739 for trunk/bp-core/bp-core-catchuri.php
- Timestamp:
- 08/31/2009 05:51:29 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-catchuri.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r1723 r1739 29 29 global $current_component, $current_action, $action_variables; 30 30 global $displayed_user_id; 31 global $is_member_page , $is_new_friend;31 global $is_member_page; 32 32 global $bp_unfiltered_uri; 33 33 global $bp, $current_blog; … … 99 99 100 100 /* Catch a member page and set the current member ID */ 101 if ( $bp_uri[0] == BP_MEMBERS_SLUG || in_array( 'wp-load.php', $bp_uri ) ) { 102 $is_member_page = true; 103 $is_root_component = true; 104 105 // We are within a member page, set up user id globals 106 $displayed_user_id = bp_core_get_displayed_userid( $bp_uri[1] ); 101 if ( !defined( 'BP_ENABLE_ROOT_PROFILES' ) ) { 102 if ( $bp_uri[0] == BP_MEMBERS_SLUG || in_array( 'wp-load.php', $bp_uri ) ) { 103 $is_member_page = true; 104 $is_root_component = true; 105 106 // We are within a member page, set up user id globals 107 $displayed_user_id = bp_core_get_displayed_userid( $bp_uri[1] ); 107 108 108 unset($bp_uri[0]);109 unset($bp_uri[1]);109 unset($bp_uri[0]); 110 unset($bp_uri[1]); 110 111 111 // if the get variable 'new' is set this the first visit to a new friends profile. 112 // this means we need to delete friend acceptance notifications, so we set a flag of is_new_friend. 113 if ( isset($_GET['new']) ) { 114 $is_new_friend = 1; 115 unset($bp_uri[2]); 116 } 117 118 /* Reset the keys by merging with an empty array */ 119 $bp_uri = array_merge( array(), $bp_uri ); 120 } 121 112 /* Reset the keys by merging with an empty array */ 113 $bp_uri = array_merge( array(), $bp_uri ); 114 } 115 } else { 116 if ( get_userdatabylogin( $bp_uri[0] ) || in_array( 'wp-load.php', $bp_uri ) ) { 117 $is_member_page = true; 118 $is_root_component = true; 119 120 // We are within a member page, set up user id globals 121 $displayed_user_id = bp_core_get_displayed_userid( $bp_uri[0] ); 122 123 unset($bp_uri[0]); 124 125 /* Reset the keys by merging with an empty array */ 126 $bp_uri = array_merge( array(), $bp_uri ); 127 } 128 } 129 122 130 if ( !isset($is_root_component) ) 123 131 $is_root_component = in_array( $bp_uri[0], $bp->root_components ); … … 193 201 194 202 $page = $bp_path; 195 203 196 204 /* Don't hijack any URLs on blog pages */ 197 205 if ( !$bp_skip_blog_check ) { … … 199 207 return false; 200 208 } 201 209 202 210 /* Make sure this is not reported as a 404 */ 203 211 if ( !$bp_no_status_set ) { … … 208 216 $wp_query->is_page = true; 209 217 } 218 210 219 211 220 if ( $located_template = locate_template( array( $page . '.php' ) ) ) {
Note: See TracChangeset
for help on using the changeset viewer.