Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/13/2009 12:13:56 AM (16 years ago)
Author:
apeatling
Message:

FIxes #308

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-classes.php

    r797 r840  
    359359        if ( $limit && $page ) {
    360360            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    361             $total_requests = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM " . $bp['groups']['table_name_members'] . " WHERE group_id = %d AND is_confirmed = 0", $group_id ) );
    362         }
    363        
    364         $paged_requests = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . $bp['groups']['table_name_members'] . " WHERE group_id = %d AND is_confirmed = 0{$pag_sql}", $group_id ) );
     361            $total_requests = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM " . $bp['groups']['table_name_members'] . " WHERE group_id = %d AND is_confirmed = 0 AND inviter_id = 0", $group_id ) );
     362        }
     363       
     364        $paged_requests = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . $bp['groups']['table_name_members'] . " WHERE group_id = %d AND is_confirmed = 0 AND inviter_id = 0{$pag_sql}", $group_id ) );
    365365
    366366        return array( 'requests' => $paged_requests, 'total' => $total_requests );
Note: See TracChangeset for help on using the changeset viewer.