Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/13/2012 05:46:52 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Clean up $bp->current_component, $bp->current_action, and $bp->current_item usage. Fixes #3738.

File:
1 edited

Legend:

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

    r5714 r5758  
    159159
    160160        // If the user was attempting to access a group, but no group by that name was found, 404
    161         if ( bp_is_groups_component() && empty( $this->current_group ) && !empty( $bp->current_action ) && !in_array( $bp->current_action, $this->forbidden_names ) ) {
     161        if ( bp_is_groups_component() && empty( $this->current_group ) && bp_current_action() && !in_array( bp_current_action(), $this->forbidden_names ) ) {
    162162            bp_do_404();
    163163            return;
     
    169169            // Prepare for a redirect to the canonical URL
    170170            $bp->redirect_stack['base_url']  = bp_get_group_permalink( $this->current_group );
    171             $bp->redirect_stack['action']    = $bp->current_action;
     171            $bp->redirect_stack['action']    = bp_current_action();
    172172        }
    173173
Note: See TracChangeset for help on using the changeset viewer.