Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/11/2011 08:04:13 PM (16 years ago)
Author:
djpaul
Message:

Fix favourited activity items from hidden groups showing in members' profiles. Fixes #2678 (branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-activity.php

    r4066 r4111  
    611611function bp_activity_get_specific( $args = '' ) {
    612612        $defaults = array(
    613                 'activity_ids' => false, // A single activity_id or array of IDs.
    614                 'page' => 1, // page 1 without a per_page will result in no pagination.
    615                 'per_page' => false, // results per page
    616                 'max' => false, // Maximum number of results to return
    617                 'sort' => 'DESC', // sort ASC or DESC
    618                 'display_comments' => false // true or false to display threaded comments for these specific activity items
     613                'activity_ids'     => false,  // A single activity_id or array of IDs.
     614                'page'             => 1,      // page 1 without a per_page will result in no pagination.
     615                'per_page'         => false,  // results per page
     616                'max'              => false,  // Maximum number of results to return
     617                'sort'             => 'DESC', // sort ASC or DESC
     618                'display_comments' => false,  // true or false to display threaded comments for these specific activity items
     619                'show_hidden'      => false
    619620        );
    620621
    … …  
    622623        extract( $r, EXTR_SKIP );
    623624
    624         return apply_filters( 'bp_activity_get_specific', BP_Activity_Activity::get_specific( $activity_ids, $max, $page, $per_page, $sort, $display_comments ) );
     625        return apply_filters( 'bp_activity_get_specific', BP_Activity_Activity::get_specific( $activity_ids, $max, $page, $per_page, $sort, $display_comments, $show_hidden ) );
    625626}
    626627
    … …  
    995996function bp_activity_get_user_favorites( $user_id ) {
    996997        $my_favs = maybe_unserialize( get_user_meta( $user_id, 'bp_favorite_activities', true ) );
    997         $existing_favs = bp_activity_get_specific( array( 'activity_ids' => $my_favs ) );
     998        $existing_favs = bp_activity_get_specific( array( 'activity_ids' => $my_favs, 'show_hidden' => true ) );
    998999
    9991000        foreach( (array)$existing_favs['activities'] as $fav )
Note: See TracChangeset for help on using the changeset viewer.