Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/15/2011 09:00:32 PM (15 years ago)
Author:
djpaul
Message:

Fix Group activity permalinks for private / hidden groups. Fixes #3210, props r-a-y

File:
1 edited

Legend:

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

    r4506 r4519  
    9494       
    9595        // Get the activity details
    96         $activity = bp_activity_get_specific( array( 'activity_ids' => bp_current_action() ) );
     96        $activity = bp_activity_get_specific( array( 'activity_ids' => bp_current_action(), 'show_hidden' => true ) );
    9797
    9898        // 404 if activity does not exist
    99         if ( !$activity = $activity['activities'][0] ) {
     99        if ( empty( $activity['activities'][0] ) || !empty( $bp->action_variables ) ) {
    100100                bp_do_404();
    101101                return;
    102         }
    103 
    104         if ( !empty( $bp->action_variables ) ) {
    105                 bp_do_404();
    106                 return;
     102
     103        } else {
     104                $activity = $activity['activities'][0];
     105                if ( empty( $activity ) ) {
     106                        bp_do_404();
     107                        return;
     108                }
    107109        }
    108110
Note: See TracChangeset for help on using the changeset viewer.