Skip to:
Content

BuddyPress.org

Changeset 4519


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

Location:
trunk
Files:
3 edited

Legend:

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

    r4517 r4519  
    2525
    2626    // Get the activity details
    27     $activity = bp_activity_get_specific( array( 'activity_ids' => $bp->action_variables[0] ) );
     27    $activity = bp_activity_get_specific( array( 'activity_ids' => $bp->action_variables[0], 'show_hidden' => true ) );
    2828
    2929    // 404 if activity does not exist
  • 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
  • trunk/bp-themes/bp-default/members/single/activity/permalink.php

    r4347 r4519  
    22
    33<div class="activity no-ajax" role="main">
    4     <?php if ( bp_has_activities( 'display_comments=threaded&include=' . bp_current_action() ) ) : ?>
     4    <?php if ( bp_has_activities( 'display_comments=threaded&show_hidden=true&include=' . bp_current_action() ) ) : ?>
    55
    66        <ul id="activity-stream" class="activity-list item-list">
Note: See TracChangeset for help on using the changeset viewer.