Changeset 11065
- Timestamp:
- 09/06/2016 06:57:41 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-groups-group.php
r11027 r11065 978 978 */ 979 979 $total_groups_sql = apply_filters( 'bp_groups_get_total_groups_sql', $t_sql, $total_sql, $r ); 980 $total_groups = $wpdb->get_var( $total_groups_sql );980 $total_groups = (int) $wpdb->get_var( $total_groups_sql ); 981 981 982 982 $group_ids = array(); … … 993 993 if ( ! empty( $r['update_meta_cache'] ) ) { 994 994 bp_groups_update_meta_cache( $group_ids ); 995 } 996 997 // Set up integer properties needing casting. 998 $int_props = array( 999 'id', 'creator_id', 'enable_forum', 'total_member_count', 1000 ); 1001 1002 // Integer casting. 1003 foreach ( $paged_groups as $key => $g ) { 1004 foreach ( $int_props as $int_prop ) { 1005 $paged_groups[ $key ]->{$int_prop} = (int) $paged_groups[ $key ]->{$int_prop}; 1006 } 995 1007 } 996 1008 … … 1432 1444 1433 1445 foreach ( $paged_groups as &$group ) { 1434 $group->is_member = groups_is_user_member( $user_id, $group->id ) ? '1' : '0';1435 $group->is_invited = groups_is_user_invited( $user_id, $group->id ) ? '1' : '0';1436 $group->is_pending = groups_is_user_pending( $user_id, $group->id ) ? '1' : '0';1446 $group->is_member = groups_is_user_member( $user_id, $group->id ) ? 1 : 0; 1447 $group->is_invited = groups_is_user_invited( $user_id, $group->id ) ? 1 : 0; 1448 $group->is_pending = groups_is_user_pending( $user_id, $group->id ) ? 1 : 0; 1437 1449 $group->is_banned = (bool) groups_is_user_banned( $user_id, $group->id ); 1438 1450 }
Note: See TracChangeset
for help on using the changeset viewer.