Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/19/2010 02:00:55 PM (15 years ago)
Author:
djpaul
Message:

Fixes some more PHP notices

File:
1 edited

Legend:

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

    r3541 r3542  
    10061006        global $bp, $wpdb;
    10071007
     1008        $pag_sql = '';
    10081009        if ( $limit && $page )
    10091010            $pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    10101011
     1012        $exclude_admins_sql = '';
    10111013        if ( $exclude_admins_mods )
    10121014            $exclude_admins_sql = $wpdb->prepare( "AND is_admin = 0 AND is_mod = 0" );
    10131015
     1016        $banned_sql = '';
    10141017        if ( $exclude_banned )
    10151018            $banned_sql = $wpdb->prepare( " AND is_banned = 0" );
    10161019
     1020        $exclude_sql = '';
    10171021        if ( $exclude )
    10181022            $exclude_sql = $wpdb->prepare( " AND m.user_id NOT IN ({$exclude})" );
     
    10261030            return false;
    10271031
    1028         if ( !isset($pag_sql) )
    1029             $total_member_count = count($members);
     1032        if ( empty( $pag_sql ) )
     1033            $total_member_count = count( $members );
    10301034        else
    10311035            $total_member_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(user_id) FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 1 {$banned_sql} {$exclude_admins_sql} {$exclude_sql}", $group_id ) );
Note: See TracChangeset for help on using the changeset viewer.