[buddypress-trac] [BuddyPress] #1726: [patch] bug in bp_core_set_uri_globals()
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Sun Jan 2 13:47:31 UTC 2011
#1726: [patch] bug in bp_core_set_uri_globals()
-----------------------+-----------------
Reporter: sbrajesh | Owner:
Type: defect | Status: new
Priority: major | Milestone: 1.3
Component: Core | Version:
Resolution: | Keywords:
-----------------------+-----------------
Comment (by DJPaul):
When we start to use custom post types, it would make much more sense to
see if we can add our own wp_rewrite parsing code/rewrites rather than the
approach in bp_core_set_uri_globals() as-is. But I digress:
Now that we are using WordPress pages for the components, and when #2609
is fixed, I believe we should be able to use: {{{ global $wp; $wp->request
}}} in bp_core_set_uri_globals() in place of this:
{{{
// Ajax or not?
if ( strpos( $_SERVER['REQUEST_URI'], 'wp-load.php' ) )
$path = bp_core_referrer();
else
$path = esc_url( $_SERVER['REQUEST_URI'] );
$path = apply_filters( 'bp_uri', $path );
}}}
In the case of a subdirectory installation, {{{$wp->request}}} already
strips off the directory name(s) as well as any ?query=strings on the URL.
--
Ticket URL: <https://trac.buddypress.org/ticket/1726#comment:7>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list