Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/19/2010 10:14:45 AM (15 years ago)
Author:
apeatling
Message:

Refresh the group member count meta when visiting the group members tab. Fixes #2211

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-groups/bp-groups-classes.php

    r2794 r2858  
    613613        return $wpdb->get_var( "SELECT COUNT(t.topic_id) FROM {$bbdb->topics} AS t, {$bp->groups->table_name} AS g LEFT JOIN {$bp->groups->table_name_groupmeta} AS gm ON g.id = gm.group_id WHERE (gm.meta_key = 'forum_id' AND gm.meta_value = t.forum_id) AND g.status = 'public' AND t.topic_status = '0' AND t.topic_sticky != '2' {$extra_sql} " );
    614614    }
     615
     616    function get_total_member_count( $group_id ) {
     617        global $wpdb, $bp;
     618
     619        return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 1 AND is_banned = 0", $group_id ) );
     620    }
    615621}
    616622
Note: See TracChangeset for help on using the changeset viewer.