Ticket #4938: bp-core-classes.php.patch
File bp-core-classes.php.patch, 1.1 KB (added by , 12 years ago) |
---|
-
bp-core-classes.php
296 296 } 297 297 298 298 // 'user_id' - When a user id is passed, limit to the friends of the user 299 // Only parse this if no 'include' param is passed, to account for300 // friend request queries301 299 // @todo remove need for bp_is_active() check 302 if ( empty( $include ) &&! empty( $user_id ) && bp_is_active( 'friends' ) ) {300 if ( ! empty( $user_id ) && bp_is_active( 'friends' ) ) { 303 301 $friend_ids = friends_get_friend_user_ids( $user_id ); 304 302 $friend_ids = $wpdb->escape( implode( ',', (array) $friend_ids ) ); 305 303 306 304 if ( ! empty( $friend_ids ) ) { 307 305 $sql['where'][] = "u.{$this->uid_name} IN ({$friend_ids})"; 308 306 309 // If the user has no friends, and we're not including specific users,make sure the query returns null310 } else if ( empty( $include ) ){307 // If the user has no friends, make sure the query returns null 308 } else { 311 309 $sql['where'][] = $this->no_results['where']; 312 310 } 313 311 }