[buddypress-trac] [BuddyPress] #1284: BP_Groups_Group::get_all method generates bad mysql request

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Oct 28 14:45:16 UTC 2009


#1284: BP_Groups_Group::get_all method generates bad mysql request
--------------------+-------------------------------------------------------
Reporter:  Fairweb  |       Owner:     
    Type:  defect   |      Status:  new
Priority:  major    |   Milestone:     
Keywords:           |  
--------------------+-------------------------------------------------------
 When using this method in the following context :
 - current user is not an admin
 - $public argument set to false
 the mysql request string would be :
 SELECT * FROM wp_bp_groups g AND g.status != 'hidden'
 instead of
 SELECT * FROM wp_bp_groups g WHERE g.status != 'hidden'

 fix bp-groups-classes.php line 428
 $hidden_sql = $only_public ? $wpdb->prepare( " AND g.status != 'hidden'")
 : $wpdb->prepare( "WHERE g.status != 'hidden'");

-- 
Ticket URL: <http://trac.buddypress.org/ticket/1284>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list