Changeset 3844 for trunk/bp-activity/bp-activity-screens.php
- Timestamp:
- 01/22/2011 04:35:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-screens.php
r3814 r3844 99 99 100 100 // No displayed user or not viewing activity component 101 if ( empty( $bp->displayed_user->id ) || $bp->current_component != $bp->activity->id)101 if ( !bp_is_activity_component() ) 102 102 return false; 103 103 104 104 // No current action or not a specific activity item 105 if ( empty( $bp->current_action ) || !is_numeric( $bp->current_action ) ) 106 return false; 105 if ( !bp_current_action() || !bp_is_current_action( 'p' ) || !isset( $bp->action_variables['0'] ) ) 106 return false; 107 108 // RE-jig the action and action variables 109 $bp->current_action = $bp->action_variables['0']; 110 unset( $bp->action_variables['0'] ); 107 111 108 112 // Get the activity details 109 $activity = bp_activity_get_specific( array( 'activity_ids' => $bp->current_action) );113 $activity = bp_activity_get_specific( array( 'activity_ids' => bp_current_action() ) ); 110 114 111 115 if ( !$activity = $activity['activities'][0] ) … … 115 119 $has_access = true; 116 120 117 // Redirect based on the type of activity121 // If activity is from a group, do an extra cap check 118 122 if ( isset( $bp->groups->id ) && $activity->component == $bp->groups->id ) { 119 123 120 // This should never happen, but we'll check it anyways124 // Activity is from a group, but groups is currently disabled 121 125 if ( !bp_is_active( 'groups') ) 122 126 bp_core_redirect( $bp->root_domain );
Note: See TracChangeset
for help on using the changeset viewer.