Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/20/2009 10:56:00 AM (17 years ago)
Author:
apeatling
Message:

Fixes #680

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-templatetags.php

    r1238 r1356  
    101101                $this->in_the_loop = true;
    102102                $this->friendship = $this->next_friendship();
    103                
     103
    104104                if ( 'requests' == $bp->current_action ) {
    105105                        $this->friendship = new BP_Friends_Friendship( $this->friendship );
     106                        $this->friendship->user_id = ( $this->friendship->friend_user_id == $bp->loggedin_user->id ) ?  $this->friendship->initiator_user_id : $this->friendship->friend_user_id;
    106107                } else {
    107108                        $this->friendship = (object) $this->friendship;
    108                        
     109
    109110                        if ( !$this->friendship->friend = wp_cache_get( 'bp_user_' . $this->friendship->user_id, 'bp' ) ) {
    110111                                $this->friendship->friend = new BP_Core_User( $this->friendship->user_id );
    … …  
    112113                        }
    113114                }
    114                
     115
    115116                if ( 0 == $this->current_friendship ) // loop has just started
    116117                        do_action('loop_start');
    … …  
    263264        </form>
    264265<?php
     266}
     267
     268function bp_friends_is_filtered() {
     269        if ( isset( $_POST['friend-search-box'] ) )
     270                return true;
     271       
     272        return false;
    265273}
    266274
Note: See TracChangeset for help on using the changeset viewer.