Skip to:
Content

BuddyPress.org

Ticket #4060: 4060-fix-friends.patch

File 4060-fix-friends.patch, 608 bytes (added by DJPaul, 14 years ago)
  • bp-core/bp-core-classes.php

    diff --git a/bp-core/bp-core-classes.php b/bp-core/bp-core-classes.php
    index 90442de..c2d5306 100644
    a b class BP_User_Query { 
    303303
    304304                        if ( !empty( $friend_ids ) ) {
    305305                                $sql['where'][] = "u.{$this->uid_name} NOT IN ({$friend_ids})";
    306                         } else {
    307                                 // If the user has no friends, make sure the query returns null
     306
     307                        // If the user has no friends, and we're not including specific users, make sure the query returns null
     308                        } elseif ( empty( $include ) ) {
    308309                                $sql['where'][] = $this->no_results['where'];
    309310                        }
    310311                }