#729 closed defect (bug) (fixed)
Admin bar vist random member is broke
Reported by: | burtadsit | Owned by: | |
---|---|---|---|
Milestone: | Priority: | major | |
Severity: | Version: | 1.0 | |
Component: | Keywords: | has-patch | |
Cc: |
Description
Using the visit random member doesn't work. Just goes to user profile. The $bp->current_component var is being trashed in bp_core_set_uri_globals() in here:
`
/* Catch a member page and set the current member ID */
if ( $bp_uri[0] == BP_MEMBERS_SLUG && !isset( $_GETrandom? ) in_array( 'bp-core-ajax-handler.php', $bp_uri ) ) { $is_member_page = true;
$is_root_component = true;
We are within a member page, set up user id globals
$displayed_user_id = bp_core_get_displayed_userid( $bp_uri[1] );
if the get variable 'new' is set this the first visit to a new friends profile.
this means we need to delete friend acceptance notifications, so we set a flag of is_new_friend.
if ( isset($_GETnew?) ) {
$is_new_friend = 1;
unset($bp_uri[2]);
}
/* Reset the keys by merging with an empty array */
$bp_uri = array_merge( array(), $bp_uri );
}
`
Well, not with that detection code because it includes the fix. The original code is:
`
if ( $bp_uri[0] == BP_MEMBERS_SLUG in_array( 'bp-core-ajax-handler.php', $bp_uri ) ) {
`
I have no idea what that code is supposed to accomplish. I do know it trashes the ability to set the $current_component var because it zaps $bp_uri.
Patch adds a skip this stuff if the url is /members/?random
Is it too much to ask of trac that it not trash the code I paste between backticks? What's the proper syntax to tell this brain dead software to leave my code alone? The devs couldn't possibly imagine that *code* would be pasted in a piece of software dedicated to software development? I'm on a roll this morning.