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-activity/bp-activity-screens.php

    r4396 r4506  
    9696        $activity = bp_activity_get_specific( array( 'activity_ids' => bp_current_action() ) );
    9797
    98         if ( !$activity = $activity['activities'][0] )
    99                 bp_core_redirect( bp_get_root_domain() );
     98        // 404 if activity does not exist
     99        if ( !$activity = $activity['activities'][0] ) {
     100                bp_do_404();
     101                return;
     102        }
     103
     104        if ( !empty( $bp->action_variables ) ) {
     105                bp_do_404();
     106                return;
     107        }
    100108
    101109        // Default access is true
     
    106114
    107115                // Activity is from a group, but groups is currently disabled
    108                 if ( !bp_is_active( 'groups') )
    109                         bp_core_redirect( bp_get_root_domain() );
     116                if ( !bp_is_active( 'groups') ) {
     117                        bp_do_404();
     118                        return;
     119                }
    110120
    111121                // Check to see if the group is not public, if so, check the
Note: See TracChangeset for help on using the changeset viewer.