Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/21/2010 11:53:03 AM (14 years ago)
Author:
apeatling
Message:

Fixing hidden group bug when there is no user logged in.

File:
1 edited

Legend:

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

    r2390 r2391  
    320320            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    321321
    322         if ( !is_site_admin() )
     322        if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    323323            $hidden_sql = "AND g.status != 'hidden'";
    324324
     
    345345            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    346346
    347         if ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) )
     347        if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    348348            $hidden_sql = "AND g.status != 'hidden'";
    349349
     
    371371        }
    372372
    373         if ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) )
     373        if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    374374            $hidden_sql = "AND g.status != 'hidden'";
    375375
     
    396396            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    397397
    398         if ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) )
     398        if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    399399            $hidden_sql = " AND g.status != 'hidden'";
    400400
     
    425425        }
    426426
    427         if ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) )
     427        if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    428428            $hidden_sql = " AND g.status != 'hidden'";
    429429
     
    454454        }
    455455
    456         if ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) )
     456        if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    457457            $hidden_sql = " AND g.status != 'hidden'";
    458458
     
    544544            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    545545
    546         if ( !is_site_admin() )
     546        if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    547547            $hidden_sql = "AND g.status != 'hidden'";
    548548
Note: See TracChangeset for help on using the changeset viewer.