Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/29/2011 08:58:28 PM (15 years ago)
Author:
boonebgorges
Message:

Refactors URL canonicalization logic, moving it into the single bp_redirect_canonical() which is loaded from bp_core_load_template() instead of redirecting during the nav setup routine. See #1741. Combines all canonicalization into a single redirect. Fixes #3771. Ensures that query strings are preserved on redirects. Fixes #3777.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-loader.php

    r5393 r5412  
    165165               
    166166                if ( bp_is_groups_component() && !empty( $this->current_group ) && !bp_current_action() ) {
    167                         $bp->current_action = apply_filters( 'bp_groups_default_extension', defined( 'BP_GROUPS_DEFAULT_EXTENSION' ) ? BP_GROUPS_DEFAULT_EXTENSION : 'home' );
     167                        $bp->current_action              = apply_filters( 'bp_groups_default_extension', defined( 'BP_GROUPS_DEFAULT_EXTENSION' ) ? BP_GROUPS_DEFAULT_EXTENSION : 'home' );
     168                       
     169                        // Prepare for a redirect to the canonical URL
     170                        $bp->redirect_stack['base_url']  = bp_get_group_permalink( $this->current_group );
     171                        $bp->redirect_stack['action']    = $bp->current_action;
    168172                }
    169173
Note: See TracChangeset for help on using the changeset viewer.