Skip to:
Content

BuddyPress.org

Changeset 4064


Ignore:
Timestamp:
02/21/2011 03:45:49 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Second attempt at synchronizing total group count and group pagination, this time checking existence of members.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-classes.php

    r4063 r4064  
    319319        $paged_groups     = $wpdb->get_results( $paged_groups_sql );
    320320
    321         $total_sql['select'] = "SELECT COUNT(DISTINCT g.id) FROM {$bp->groups->table_name} g, {$bp->groups->table_name_groupmeta} gm2";
     321        $total_sql['select'] = "SELECT COUNT(DISTINCT g.id) FROM {$bp->groups->table_name} g, {$bp->groups->table_name_members} gm1, {$bp->groups->table_name_groupmeta} gm2";
    322322
    323323        if ( !empty( $user_id ) )
     
    338338        }
    339339
     340        $total_sql['where'][] = "g.id = gm1.group_id";
    340341        $total_sql['where'][] = "g.id = gm2.group_id";
    341342        $total_sql['where'][] = "gm2.meta_key = 'last_activity'";
Note: See TracChangeset for help on using the changeset viewer.