Ticket #40: reference.patch
File reference.patch, 3.1 KB (added by , 15 years ago) |
---|
-
bp-friends.php
210 210 Return an array of friend objects for the current user. 211 211 **************************************************************************/ 212 212 213 function friends_get_friendships( $user_id = false, $friendship_ids = false, $pag_num = 5, $pag_page = 1, $get_requests = false, $count = false ) {213 function friends_get_friendships( $user_id = false, &$friendship_ids = false, $pag_num = 5, $pag_page = 1, $get_requests = false, $count = false ) { 214 214 global $current_userid; 215 215 216 216 if ( !$user_id ) -
bp-friends/bp-friends-ajax.php
14 14 $total_friend_count = 0; 15 15 16 16 if ( $_POST['friend-search-box'] == "" ) { 17 $friendships = friends_get_friendships( $creds['current_userid'], false, $pag_num, $pag_page, false );17 $friendships = friends_get_friendships( $creds['current_userid'], $ids = false, $pag_num, $pag_page, false ); 18 18 } else { 19 19 $friendships = BP_Friends_Friendship::search_friends( $_POST['friend-search-box'], $creds['current_userid'], $pag_num, $pag_page ); 20 20 } -
bp-friends/bp-friends-classes.php
152 152 // Get the total number of friendships 153 153 $fs_count = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM $bp_friends_table_name WHERE (friend_user_id IN ($filtered_fids) AND initiator_user_id = %d) OR (initiator_user_id IN ($filtered_fids) AND friend_user_id = %d)", $user_id, $user_id ) ); 154 154 155 $friendships = friends_get_friendships( $user_id, &$fs_ids, 5, 1, false, $fs_count );155 $friendships = friends_get_friendships( $user_id, $fs_ids, 5, 1, false, $fs_count ); 156 156 157 157 return $friendships; 158 158 } -
bp-friends/bp-friends-templatetags.php
26 26 $this->friendships = BP_Friends_Friendship::search_friends( $_POST['friend-search-box'], $current_userid, $this->pag_num, $this->pag_page ); 27 27 } else if ( $current_action == 'requests' ) { 28 28 // Friendship Requests 29 $this->friendships = friends_get_friendships( $current_userid, false, $this->pag_num, $this->pag_page, true );29 $this->friendships = friends_get_friendships( $current_userid, $ids = false, $this->pag_num, $this->pag_page, true ); 30 30 } else { 31 31 // All confirmed friendships 32 $this->friendships = friends_get_friendships( $current_userid, false, $this->pag_num, $this->pag_page, false );32 $this->friendships = friends_get_friendships( $current_userid, $ids = false, $this->pag_num, $this->pag_page, false ); 33 33 } 34 34 35 35 $this->total_friend_count = (int)$this->friendships['count'];