Changeset 4770 for trunk/bp-groups/bp-groups-classes.php
- Timestamp:
- 07/21/2011 10:27:09 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-classes.php
r4764 r4770 542 542 /* Fetch the logged in users status within each group */ 543 543 $user_status = $wpdb->get_col( $wpdb->prepare( "SELECT group_id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id IN ( {$group_ids} ) AND is_confirmed = 1 AND is_banned = 0", $bp->loggedin_user->id ) ); 544 for ( $i = 0 ; $i < count( $paged_groups ); $i++) {544 for ( $i = 0, $count = count( $paged_groups ); $i < $count; ++$i ) { 545 545 $paged_groups[$i]->is_member = false; 546 546 … … 552 552 553 553 $user_banned = $wpdb->get_col( $wpdb->prepare( "SELECT group_id FROM {$bp->groups->table_name_members} WHERE is_banned = 1 AND user_id = %d AND group_id IN ( {$group_ids} )", $bp->loggedin_user->id ) ); 554 for ( $i = 0 ; $i < count( $paged_groups ); $i++) {554 for ( $i = 0, $count = count( $paged_groups ); $i < $count; ++$i ) { 555 555 $paged_groups[$i]->is_banned = false; 556 556 … … 1106 1106 if ( bp_is_active( 'friends' ) ) { 1107 1107 $friend_status = $wpdb->get_results( $wpdb->prepare( "SELECT initiator_user_id, friend_user_id, is_confirmed FROM {$bp->friends->table_name} WHERE (initiator_user_id = %d AND friend_user_id IN ( {$user_ids} ) ) OR (initiator_user_id IN ( {$user_ids} ) AND friend_user_id = %d )", $bp->loggedin_user->id, $bp->loggedin_user->id ) ); 1108 for ( $i = 0 ; $i < count( $members ); $i++) {1108 for ( $i = 0, $count = count( $members ); $i < $count; ++$i ) { 1109 1109 foreach ( (array)$friend_status as $status ) { 1110 1110 if ( $status->initiator_user_id == $members[$i]->user_id || $status->friend_user_id == $members[$i]->user_id )
Note: See TracChangeset
for help on using the changeset viewer.