Changeset 2858
- Timestamp:
- 03/19/2010 10:14:45 AM (15 years ago)
- Location:
- branches/1.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-groups.php
r2833 r2858 565 565 566 566 if ( $bp->is_single_item ) { 567 /* Refresh the group member count meta */ 568 groups_update_groupmeta( $bp->groups->current_group->id, 'total_member_count', groups_get_total_member_count( $bp->groups->current_group->id ) ); 569 567 570 do_action( 'groups_screen_group_members', $bp->groups->current_group->id ); 568 571 bp_core_load_template( apply_filters( 'groups_template_group_members', 'groups/single/home' ) ); … … 1723 1726 } 1724 1727 1728 function groups_get_total_member_count( $group_id ) { 1729 return BP_Groups_Group::get_total_member_count( $group_id ); 1730 } 1731 1725 1732 /*** Group Fetching, Filtering & Searching *************************************/ 1726 1733 -
branches/1.2/bp-groups/bp-groups-classes.php
r2794 r2858 613 613 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} " ); 614 614 } 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 } 615 621 } 616 622
Note: See TracChangeset
for help on using the changeset viewer.