Changeset 8200 for trunk/bp-groups/bp-groups-classes.php
- Timestamp:
- 03/29/2014 12:35:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-classes.php
r8168 r8200 2363 2363 $bp = buddypress(); 2364 2364 2365 return (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT m.group_id) FROM {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE m.group_id = g.id AND m.is_confirmed = 0 AND m.inviter_id != 0 AND m.invite_sent = 1 AND m.user_id = %d ORDER BY date_modified ASC", $user_id ) ); 2365 $count = wp_cache_get( $user_id, 'bp_group_invite_count' ); 2366 2367 if ( false === $count ) { 2368 $count = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT m.group_id) FROM {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE m.group_id = g.id AND m.is_confirmed = 0 AND m.inviter_id != 0 AND m.invite_sent = 1 AND m.user_id = %d", $user_id ) ); 2369 wp_cache_set( $user_id, $count, 'bp_group_invite_count' ); 2370 } 2371 2372 return $count; 2366 2373 } 2367 2374
Note: See TracChangeset
for help on using the changeset viewer.