Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/13/2011 09:54:52 PM (15 years ago)
Author:
boonebgorges
Message:

Introduces bp_do_404() for easy 404ing. Corrects invalid path handling throughout, using bp_do_404(). Fixes #3280. Props DJPaul

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-screens.php

    r4046 r4506  
    1313 * @uses bp_core_load_template() Looks for and loads a template file within the current member theme (folder/filename)
    1414 */
    15 function xprofile_screen_display_profile() {
     15function xprofile_screen_display_profile() {   
    1616        $new = isset( $_GET['new'] ) ? $_GET['new'] : '';
    1717
     
    3939
    4040        // Check the field group exists
    41         if ( !xprofile_get_field_group( $bp->action_variables[1] ) )
    42                 bp_core_redirect( bp_get_root_domain() );
     41        if ( ( !empty( $bp->action_variables[0] ) && 'group' != $bp->action_variables[0] ) || !xprofile_get_field_group( $bp->action_variables[1] ) ) {
     42                bp_do_404();
     43                return;
     44        }
    4345
    4446        // Check to see if any new information has been submitted
     
    133135                return false;
    134136
     137        if ( !empty( $bp->action_variables ) ) {
     138                bp_do_404();
     139                return;
     140        }
     141
    135142        $bp->avatar_admin->step = 'upload-image';
    136143
Note: See TracChangeset for help on using the changeset viewer.